perl-unicode

Re: bareword test on ebcdic.

2005-07-31 22:36:52


--- Yitzchak Scott-Thoennes <sthoenna(_at_)efn(_dot_)org> wrote:

On Thu, Jul 28, 2005 at 12:35:13AM -0700, rajarshi
das wrote:
Nicholas Clark wrote:
If you put those 3 bytes directly between the '{'
and '}' characters in
the EBCDIC version of that 1 liner, does it also
print 3500?

I am unable to put those three bytes in the
1-liner you mentioned above, since I am unable to
print the chars corresponding to those bytes
(www.kostis.net/charsets/ebc1047.htm) on the command
line. 

I think that the regression tests tended to do
something like

if (ord 'A' == 65) {
# Do the ASCII/UTF-8 version
} else {
# Assume EBCDIC
}

I tried to fix the attribution above; apologies if I
got it wrong.

I think the way you want to test this is something
like:

  $key = "\x{0442}\x{0435}\x{0441}\x{0442}";
  if ( $hash{$key} eq eval "\$hash{$key}" )
But, would doing something like,
$key = "\x{0442}\x{0435}\x{0441}\x{0442}";
be within the scope of a bareword test ?

Also, does eval "\$hash{$key}" as in the 'if'
condition remain within the scope of a bareword test ?



It's unclear to me whether $key needs to be
different for EBCDIC.
\x{0442} is the unicode value for the character that
we are trying to test. So, as long as we are testing
the same character, $key needs to be the same on both
platforms.

Are you just using perl on z/OS, or are you building
it yourself?
I am building perl on z/OS and using it. 

If the latter, Dave Mitchell has been looking for
someone to test
some parser changes he made on an EBCDIC platform so
they can be
integrated into the 5.8.x series.


Thanks,
Rajarshi.


                
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

<Prev in Thread] Current Thread [Next in Thread>
  • Re: bareword test on ebcdic., rajarshi das <=