Re: BOM and principle of least surprise

[email protected] (Jarkko Hietaniemi)
Newsgroups perl.unicode
Message-ID <[email protected]>
Erland Sommarskog wrote:
> Jarkko Hietaniemi ([email protected]) writes:
> 
>>Nick Ing-Simmons wrote:
>>
>>>This thread started as complaint that perl5 can't read a 
>>>script saved as UCS-2/UTF-16 or whatever Windows uses.
>>
>>Uh, really?  Perl 5.8+ should be able to do that, automatically.
> 
> 
> 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.

> option on the command-line to specify the encoding of the script file,
> but I haven't tried. 
> 
>>I thought the issue was about Perl not automatically guessing the
>>UTF-16 encoding of input data.
> 
> 
> Both input data and the script. Just because the script has been saved
> in UTF-8, does not mean that literals in the script are taken as UTF-8.

Oh, great.  Now you want to mix different encodings in the same file.
I give up :-)

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