1#! /bin/sh 2 3# Test conversion from BIG5 to UTF-8. 4 5tmpfiles="" 6trap 'rm -fr $tmpfiles' 1 2 3 15 7 8tmpfiles="$tmpfiles mco-test1.po" 9cat <<\EOF > mco-test1.po 10# Chinese translation for GNU gettext messages. 11# 12msgid "" 13msgstr "" 14"MIME-Version: 1.0\n" 15"Content-Type: text/plain; charset=big5\n" 16"Content-Transfer-Encoding: 8bit\n" 17 18#: src/msgcmp.c:155 src/msgmerge.c:273 19msgid "exactly 2 input files required" 20msgstr "���\�����n���n���w�������J��" 21EOF 22 23tmpfiles="$tmpfiles mco-test1.out" 24: ${MSGCONV=msgconv} 25${MSGCONV} --to-code=UTF-8 -o mco-test1.out mco-test1.po 26test $? = 0 || { rm -fr $tmpfiles; exit 1; } 27 28tmpfiles="$tmpfiles mco-test1.ok" 29cat <<\EOF > mco-test1.ok 30# Chinese translation for GNU gettext messages. 31# 32msgid "" 33msgstr "" 34"MIME-Version: 1.0\n" 35"Content-Type: text/plain; charset=UTF-8\n" 36"Content-Transfer-Encoding: 8bit\n" 37 38#: src/msgcmp.c:155 src/msgmerge.c:273 39msgid "exactly 2 input files required" 40msgstr "������������������������������������������" 41EOF 42 43: ${DIFF=diff} 44# Redirect stdout, so as not to fill the user's screen with non-ASCII bytes. 45${DIFF} mco-test1.ok mco-test1.out >/dev/null 46result=$? 47 48rm -fr $tmpfiles 49 50exit $result 51