develooper Front page | perl.perl5.porters | Postings from March 2007

Re: the utf8 flag (was Re: [perl #41527] decode_utf8 sets utf8 flag on plain ascii strings)

Thread Previous | Thread Next
From:
Marc Lehmann
Date:
March 30, 2007 05:24
Subject:
Re: the utf8 flag (was Re: [perl #41527] decode_utf8 sets utf8 flag on plain ascii strings)
Message ID:
20070330122407.GB21553@schmorp.de
Forgot something, sorry :)

> At the very least, it needs to be documented, and *hard* rules on when
> perl uphgraded or downgrades would need to be established, as, right now,
> behaviour is pretty random over versions. Of course, down that path lies
> madness and perl5 will ever stay a failed experiment of how to do unicode
> correctly (namely, abstracted away from the actual encoding).

In fact, I teach a lot of people about unicode in perl. And the problem
is not that the unicode model doesn't work or isn't simple, the problem
is those "features" that remind people that perl has no abstract unicode
model, that they do have to understand the internals of the UTF-X bit.

Thats really the problem: if perl had a pure 5.005_5x model, then it would
be far less easy, but at least consistent. If perl had the abstract model
juerd dreams of, then perl would have a very easy unicode model that boils
down to what I talked about on the perl workshop: encode/decode when doing
I/O, oherwise, enjoy.

As it is, perl has this abstract model that nobody understands because
they are constantly reminded that it isn't fully implemented and they do
have to care about the UTF-X flag themselves, as perl seemingly randomly
doesn't.

-- 
                The choice of a
      -----==-     _GNU_
      ----==-- _       generation     Marc Lehmann
      ---==---(_)__  __ ____  __      pcg@goof.com
      --==---/ / _ \/ // /\ \/ /      http://schmorp.de/
      -=====/_/_//_/\_,_/ /_/\_\      XX11-RIPE


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