perl-unicode

Re: BOM and principle of least surprise

2004-05-16 06:30:04
To be able to that, it would have have to understand byte-order marks
(which it doesn't). I think there was a suggestion that you could
specify an 

In 5.8.5 it will.


Will such an option include the possibility to say that I want Perl to
determine the encoding from the byte-order mark?

No.  The patch I submitted peeks at the beginning of a Perl script and
if it either sees a BOM or something that looks like raw BOMless UTF-16
(every other byte zero, every other not) of either endianness, Perl will
understand.

Nothing for input files, someone would have to write a PerlIO layer for
that.

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