Hi

The following script yields different outputs on two different platforms

use Encode;
$string = "ravi";
$enc_string = encode("iso-8859-16", $string);
print "\n enc_string: $enc_string\n";

On EBCDIC platform like z/OS
The enc_string now contains: >ñ=Á whose codepoints are  \x6E
\x49\x7E\x65 whereas on ASCII platform enc_string contains "ravi"
which is obvious as the invariant characters on any of the ISO-8859
codepages is same on ASCILL like platforms.

On EBCDIC the output should be \x72\x61\x76\x69. Please correct me if
I am wrong!

I am unable to figure out if there is a problem in encode module or 
the enc2xs utility which generates the unicode character mapping
files.

I just happened to check the output of the files that gets generated
by using the enc2xs using the miniperl. They are

a)ext/Encode/Byte/byte_t.c
b)ext/Encode/def_t.c

These two files are different across two platforms (Linux, z/OS). 
Should these files be specific to platform? If they are different,
please let me know how these encode tables are generated specific to
"platform"

Thanks in advance
Sastry

Reply via email to