1#! /bin/sh 2. "${srcdir=.}/init.sh"; path_prepend_ . ../src 3 4# Test conversion from UTF-8 to BIG5. 5# Test that encoding names are case insensitive. 6 7# Note: This test fails on Linux with musl libc versions that don't support 8# the BIG5 encoding in 'iconv'. 9 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 24: ${MSGCONV=msgconv} 25${MSGCONV} -t Big5 -o mco-test2.out mco-test2.po || Exit 1 26 27cat <<\EOF > mco-test2.ok 28# Chinese translation for GNU gettext messages. 29# 30msgid "" 31msgstr "" 32"MIME-Version: 1.0\n" 33"Content-Type: text/plain; charset=BIG5\n" 34"Content-Transfer-Encoding: 8bit\n" 35 36#: src/msgcmp.c:155 src/msgmerge.c:273 37msgid "exactly 2 input files required" 38msgstr "���\��ݭn��n���w��ӿ�J��" 39EOF 40 41: ${DIFF=diff} 42# Redirect stdout, so as not to fill the user's screen with non-ASCII bytes. 43${DIFF} mco-test2.ok mco-test2.out >/dev/null 44result=$? 45 46exit $result 47