diff --git a/test-charset-in-iso b/test-charset-in-iso new file mode 100644 index 0000000..7416084 --- /dev/null +++ b/test-charset-in-iso @@ -0,0 +1 @@ +ISO [é] \ No newline at end of file diff --git a/test-charset-in-utf b/test-charset-in-utf new file mode 100644 index 0000000..b21a6b5 --- /dev/null +++ b/test-charset-in-utf @@ -0,0 +1 @@ +UTF8 [é] \ No newline at end of file diff --git a/test-charset.sh b/test-charset.sh new file mode 100755 index 0000000..07f65e2 --- /dev/null +++ b/test-charset.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +function file_load +{ + out="$1" + in="$2" + cc="$3" + cs="$4" + + echo -n "CC: [$cc] CS: [$cs] $(cat $in)" >$$.tmp + + mqsload -mb '\n---\n' $cc -cs $cs $out $$.tmp + + \rm $$.tmp +} + +function file_save +{ + out="$1" + in="$2" + cc="$3" + cs="$4" + cm="$5" + + mqssave -mb '\n---\n' $cc -cs $cs $cm -bem $out $in +} + + + +file_load DLQ test-charset-in-utf "-cc" 1208 +file_load DLQ test-charset-in-utf "-cc" 819 +file_load DLQ test-charset-in-iso "-cc" 1208 +file_load DLQ test-charset-in-iso "-cc" 819 + +file_load DLQ test-charset-in-utf " " 1208 +file_load DLQ test-charset-in-utf " " 819 +file_load DLQ test-charset-in-iso " " 1208 +file_load DLQ test-charset-in-iso " " 819 + + + + +\rm test-charset-out-cc-utf test-charset-out-cc-iso test-charset-out-__-utf test-charset-out-__-iso + +file_save test-charset-out-cc-utf DLQ "-cc" 1208 "-cm" +file_save test-charset-out-cc-iso DLQ "-cc" 819 "-cm" + +file_save test-charset-out-__-utf DLQ " " 1208 "-cm" +file_save test-charset-out-__-iso DLQ " " 819 " "