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