perl-unicode

Re: iso-2022-jp encoding on EBCDIC

2005-12-15 07:55:57

On Wed, 14 Dec 2005 05:19:00 -0800 (PST), rajarshi das 
<dazio_r(_at_)yahoo(_dot_)com> wrote

 Hi,

The following two line script gives an error on z/OS : "Unknown encoding 
'iso-2022-jp' at line ..".
-----------------
use Encode;
use encoding 'iso-2022-jp';
------------

How do we confirm if iso-2022-jp is supported on z/OS or not ?
Or if it is supported and not working as expected for some reason ? 

I found Encode/Config.pm such a chunk.

unless (ord("A") == 193){
    %ExtModule =
        (
(snip)
         '7bit-jis'           => 'Encode::JP',
         'euc-jp'             => 'Encode::JP',
         'iso-2022-jp'        => 'Encode::JP',
         'iso-2022-jp-1'      => 'Encode::JP',
         'jis0201-raw'        => 'Encode::JP',
         'jis0208-raw'        => 'Encode::JP',
         'jis0212-raw'        => 'Encode::JP',
         'cp932'              => 'Encode::JP',
         'MacJapanese'        => 'Encode::JP',
         'shiftjis'           => 'Encode::JP',

And I found this in Encode/JP.pm (similarly in CN, KR, TW)

BEGIN {
    if (ord("A") == 193) {
        die "Encode::JP not supported on EBCDIC\n";
    }
}

Any pointers to the source where this encoding is defined ?
The pointers might help understand why it is not defined
on an EBCDIC platform. 

I printed Encode->encodings() on linux as well as z/OS
and they are identical (and both donot contain iso-2022-jp).
Is this in anyway related to the above problem ? 

Try this on linux and z/OS. I guess they are not identical.

  use Encode;
  use Encode::JP; # load JP encodings including iso-2022-jp
  print Encode->encodings();

Regards,
SADAHIRO Tomoyuki


<Prev in Thread] Current Thread [Next in Thread>