perl-unicode

bareword test on ebcdic

2005-06-15 01:20:41
Hi,
Following is a snapshot of a bareword test :
--------------------------
use utf8;
my %hash = (те => 123);
is($hash{те}, $hash{'те'});
---------------------------
It runs on ascii and passes but fails on ebcdic (z/OS,
ibm-1047) with perl-5.8.6.

The above two barewords (т and е) which
make up the key of the hash, cannot be displayed on
ebcdic. 
What do I replace the above barewords (which
correspond to '\xb8\x43\x43' and \xb8\x42\x64' in
utf-ebcdic) with, on ebcdic ? 

Can I  say %hash = ('\xb8\x43\x43'.'\xb8\x42\x64' =>
123)  ? Or would this mean a string because of the
single quotes and the concat operator ? 

Is there some other way to represent the barewords
above (other than printing the bareword characters
themselves), so that the test works ? 

Thanks in advance,
Rajarshi.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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