Re: case folding failure on EBCDIC

[email protected] (SADAHIRO Tomoyuki)
Newsgroups perl.unicode,perl.mvs,perl.perl5.porters
Message-ID <[email protected]>
On Mon, 17 Oct 2005 00:27:42 -0700 (PDT), rajarshi das <[email protected]> wrote

> > Or is the value stored in $b1 generated by
> > pack("U0U*", map { hex }
> > split " ", '00FF') really a representation of
> > U+00FF?
> > 
> > use Devel::Peek and what is output from
> > Devel::Peek::Dump($b1)?
> 
> Following is the output in UTF-EBCDIC for Dump($b1) :
> 
> SV = PV(0x20db050c) at 0x20dcaf9c
>   REFCNT = 1
>   FLAGS = (POK,pPOK,UTF8)
>   PV = 0x20db5a70 "\213\163"\0 [UTF8 "\x{df}"]
>   CUR = 2
>   LEN = 3
> 
> Rajarshi.

Well, "\213\163" is U+00FF in UTF-EBCDIC.
(EBCDIC "\x{DF}" is U+00FF too.)
I think  pack("U0U*") works correctly.

regards,
SADAHIRO Tomoyuki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.