Re: Interpretation of non-UTF8 strings

[email protected] (Jarkko Hietaniemi)
Newsgroups perl.unicode
Message-ID <[email protected]>
Jarkko Hietaniemi wrote:

>>$ perl -e 'use open ":locale"; use encoding(latin2); print chr(260), "\n"'
>>Ą
>>$ perl -e 'use encoding(latin2); use open ":locale"; print chr(260), "\n"'
>>"\x{12a9}" does not map to iso-8859-2 at -e line 1.
>>panic: sv_setpvn called with negative strlen at -e line 1.
> 
> 
> Which Perl?  With 5.8.5 I get Ą.

Ooops.  Perl 5.8.5 with my below-mentioned patch.

> With the patch I just sent to [email protected] for Perl 5.8.5,
> these all seem to work as you expect.  The failure in the second one was
> not the case of forgetting utf8, it was in fact one too many utf8s...
> 


-- 
Jarkko Hietaniemi <[email protected]> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen
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.