perl-unicode

Re: Encode utf-16 problem

2002-12-03 04:30:04
Aw.  You can't use 'utf16' for "use encoding" or PerlIO.  You have to 
specify the endianness.  Because of the BOM mark you can't use it for 
PerlIO stream.

Hmm.... Even with endianness strictly set PerlIO still warns w/ partial 
character warning.  Should I mark all UTF as non-PerlIO-savvy (at least 
BOMless ones should be done so).  Since Partial Character warnings are 
handled by PerlIO::encoding, it takes NI-XS to fix the prob....

Dan the Encode Maintainer

Actually this was originally reported by David Dyck wondering why ":utf16"
doesn't work in the three argument form of open: open(FH, ":utf16", $file).
(One gets a complaint of PerlIO/utf16.pm not existing.)  I thought:
'Ha!  Of course one needs to do ":encoding(utf16)" instead!'-- but that
didn't work much better, as you can see.
See http://bugs6.perl.org/rt2/Ticket/Display.html?id=15533

-- 
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>