perl-unicode

Re: Interpretation of non-UTF8 strings

2004-08-16 13:30:12
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 perl5-porters(_at_)perl(_dot_)org 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 <jhi(_at_)iki(_dot_)fi> http://www.iki.fi/jhi/ "There is this 
special
biologist word we use for 'stable'.  It is 'dead'." -- Jack Cohen

<Prev in Thread] Current Thread [Next in Thread>