1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#!/bin/sh
set -e
at_exit() {
echo "info: test exiting"
}
trap at_exit INT TERM EXIT
cd "$AUTOPKGTEST_TMP"
set -x
TMPFILE=testfile.txt
echo "Test file with UTF-8 and ISO-8859-1" > "$TMPFILE"
echo The special Norwegian characters are æ, ø and å >> "$TMPFILE"
echo The special Norwegian characters are æ, ø and å | iconv -f UTF-8 -t ISO-8859-1 >> "$TMPFILE"
if mixconv -d "$TMPFILE" | iconv -f UTF-8 -t ASCII//TRANSLIT; then
echo "success: entire file is UTF-8."
else
echo "failure: entire file is not UTF-8."
fi
rm "$TMPFILE"
|