Re: BOM and principle of least surprise

[email protected] (Jarkko Hietaniemi)
Newsgroups perl.unicode
Message-ID <[email protected]>
>>>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 <[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.