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