develooper Front page | perl.perl5.porters | Postings from October 2005

case folding failure on EBCDIC

From:
rajarshi das
Date:
October 3, 2005 07:13
Subject:
case folding failure on EBCDIC
Message ID:
20051003141315.30684.qmail@web33701.mail.mud.yahoo.com
Hi,
The following unicode folding test fails on EBCDIC
(perl-5.8.6) :

$a = '0178';
$b = '00FF';

$a1 = pack("U0U*", hex $code);
$b1 = pack("U0U*", map { hex } split " ", $mapping);

if (":$b1:" =~ /:[$a1]:/i) {
print "ok\n";
}

Alternately, if $a = '0178', and $b = '00DF', the test
passes.

Why is this so ? 
Is it because \xFF as a border case ( 1 less than 256)
is not properly handled ?

Does someone have any thoughts on the source of the
problem ?

Thanks in advance,
Rajarshi.



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About