Subject: | encoding iso-2022-jp doesnot work on ebcdic |
perl-5.8.7.tar.gz from cpan.org was used.
Perl version : 5.8.7
Operating System : z/OS 1.4
---------------------------------
use encoding 'iso-2022-jp';
$a = "$B&&(B"; # && is \x50\x50 on EBCDIC which is valid acc to jis0208.ucm
print "a : $a\n";
----------------------------------
On running the above script, the o/p on ebcdic :
Malformed UTF-8 character (unexpected end of string)
at /u/isldev2/tmp_dbg/perl-5.8.7/lib/utf8_heavy.pl
line 330.
Malformed UTF-8 character (unexpected continuation
byte 0x6a, with no preceding start byte) in pattern
match (m//) at /u/isldev2/tmp_dbg/perl-5.8.7/lib/utf8_heavy.pl line
337.
Malformed UTF-8 character (unexpected continuation
byte 0x6a, with no preceding start byte) in pattern
match (m//) at
/u/isldev2/tmp_dbg/perl-5.8.7/lib/utf8_heavy.pl line
337.
*/Bæ=-╚╬╔ceB&-1dB°°B&
Notes : iso-2022-jp was enabled by removing the line :
'iso-2022-jp' => 'Encode::JP',
outside the unless (ord 'A' == 193) block.