develooper Front page | perl.perl5.porters | Postings from December 2010

Re: refined :utf8 I/O layers proposal

Thread Previous | Thread Next
David Golden
December 25, 2010 19:04
Re: refined :utf8 I/O layers proposal
Message ID:
On Sat, Dec 25, 2010 at 5:07 PM, Eric Brine <> wrote:
> On Sat, Dec 25, 2010 at 9:17 AM, David Golden <> wrote:
>> On  Karl's proposal, I agree with Zefram that it's headed in the right
>> direction.  Let's say that we call perl's internal encoding
>> "encoding(int72)" for the sake of argument below.  Then we have two
>> encodings:
>>  :encoding(UTF-8)
>>  :encoding(int72)
> There's really three. UTF-8 for interchange, UTF-8 for intrachange and
> int72.

What's the difference between "interchange" and "intrachange"?

> warn and let it through (yuck!)
> warn and substitute in U+FFFD
> warn and recode
> recode (no warning)

Assuming that "encoding(int72)" allows overlong sequences and that
other layers can be added to modify that stream, then such a layer
could do any of those.  The second choice is probably the best
"default" choice.

-- David

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About