develooper Front page | perl.perl5.porters | Postings from April 2012

Re: unicode question

Thread Previous | Thread Next
From:
Tom Christiansen
Date:
April 26, 2012 11:20
Subject:
Re: unicode question
Message ID:
3943.1335464398@chthon
Eric Brine <ikegami@adaelis.com> wrote
   on Thu, 26 Apr 2012 12:51:28 EDT: 

>> ** If Perl interprets **STDIN**, (not an arbitrary file opened with
>>    'open', but standard stream'ed input from an all UTF-8 environment,
>>    then the assumption should be UTF-8 encoding.

> No. At best, it's only valid to assume it's UTF-8 if the handle
> is known to be text, and Perl has no way of knowing that.

> To do otherwise would corrupt data.

Well, yes, kinda.

But I've run with a PERL_UNICODE=SA environment for years, and
can't remember having to disable that.  

The annoying thing is having to do PERL_UNICODE=SAD for certain
programs but not others.  It really really annoys me that <ARGV>
could ever have a mixed encoding.

--tom


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About