Front page | perl.perl5.porters |
Postings from April 2012
Re: unicode question
Thread Previous
|
Thread Next
From:
Jesse Luehrs
Date:
April 26, 2012 07:33
Subject:
Re: unicode question
Message ID:
20120426143259.GP4502@tozt.net
On Thu, Apr 26, 2012 at 01:26:01AM -0700, Linda W wrote:
> Eric Brine wrote:
> >(1) refers to how Perl behaves in response to bugs in user code.
> ---
> ??? Bugs in user code the first 256 code points don't agree! The
> first 127 code points agree. But at encoding 80, you have to go to 2-byte
> encoding, to save everything, -- I don't understand when you say
> 'downgraded', as downgrading implies a loss of information. Where
> as UTF-8 can hold all of
> unicode, ISO-8859-1 only holds 256 bytes, the latter half of which are not
> unicode compatible because they have the high bit set.
>
> 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.
>
> To do otherwise is going to cause problems.
Why are you assuming that text is the only thing that people ever pipe
to a program? Interpreting STDIN as UTF-8 would break something along
the lines of a perl implementation of gzip, for instance. This may not
be a bad thing for a default assuming it can be overridden, but it would
certainly not be backwards compatible.
-doy
Thread Previous
|
Thread Next