LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: Peter Prymmer Date: Thu Jul 20 06:26:51 2006 Subject: Re: Convert-IBM390-0.22 module
Geoffrey Rommel <nazconsult@sbcglobal.net> wrote on 07/19/2006 10:57:59 AM: > Well, this is a poser. My first question is why you would even want this > module in z/OS, since its main purpose is to convert EBCDIC data to a Unix or > Windows environment. > > If you really do want it, it won't be easy. The module assumes that it will be > running on an ASCII platform. I believe even a Unix System Services partition > under z/OS uses ASCII. You, however, seem to be running in a true EBCDIC > environment, so all of the character conversions are failing. This is to be expected. For what it might be worth a Unix System Services partition under z/OS uses a EBCDIC character encoding. It is one of the platforms that necessitated the various ord('A') calls in the *.t files in the perl source. Some examples from perl 5.8.7 include: t/op/vec.t my $Is_EBCDIC = (ord('A') == 193) ? 1 : 0; t/op/ord.t ok(ord('A') == 65 || ord('A') == 193, "ord('A') is ".ord('A')); lib/Net/t/require.t if (ord('A') == 193 && !eval "require Convert::EBCDIC") { etc. > Solving this problem would require rewriting the entire module for the EBCDIC > environment. There could then be two versions of the module, or perhaps the > two could be packaged together and the module could detect its environment at make time. Using the above recipes it would be possible to determine the coded character set in use at 'perl Makefile.PL' time or make time. Within the perl source perl.h has the macro EBCDIC defined if it was built on an EBCDIC platform. Or you could use a recipe related to one Larry Wall suggested such as the one in pp_pack.c: #if 'J'-'I' == 1 /* ASCII */ #else /* EBCDIC */ #endif Peter Prymmer
| Navigate in group perl.mvs at sever nntp.perl.org | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by PHP Developer
Powered By PHP Consultants |