On Thu, 7 Dec 2006, Marius Feraru wrote:
> > On Wed, 6 Dec 2006, Marius Feraru wrote:
> >> I always choose Unicode... working harder (obviously) on getting "data"
> >> upgraded to Unicode (Encode::Detect is a useful helper _usually_).
> ^^^ i did say this, but missed to explain what "data" means. It's your
> "everything" :))
>
> So yes, as your see, I know this could be a tremendous work do deal with
> those buggers ;-)

So we are in agreement on those points.

> >>   preamble => qq{use encoding 'utf8';\n},
> > Yes, that is the advertised solution, which is supposed to just assume
> > everything is utf8.
> Nope, all it means is that your source code is utf8 encoded! :)

That's the old "use utf8" behavior.

> (don't quote the docs, I know it has some sugar on top _in some cases_ -
> setting PerlIO layers of STDIN/STDOUT - but _never_ rely on that).

Sorry, gotta quote the docs.  Here's the section of the encoding doc which
I refer to as the "advertising".

   Implicit upgrading for byte strings

       By default, if strings operating under byte semantics and strings
       with Unicode character data are concatenated, the new string will
       be created by decoding the byte strings as ISO-8859-1 (Latin-1).

       The encoding pragma changes this to use the specified encoding
       instead.  For example:

So whenever an upgrade occurs, it will upgrade from utf8 to utf8, and not
corrupt your utf8 string.  That worked ok by my testing, but the whole
house of cards fell down when I did "print $x".  As you say, _never_ rely
on PerlIO.

> > I eventually tracked my problem down to a bug in perl itself.
> > <http://rt.perl.org/rt3//Public/Bug/Display.html?id=36248>
> Sorry, looks like nobody read your bug report. :(
> Quite a drag, since it's one and a half years old... I suppose nobody
> cared to close it as invalid or something :(

I personally spoke to one of the perl developers after his utf8 talk at
OSCON and pointed this ticket out to him.  Such is life.

> Sorry again John, this is not the Saint Graal we're all looking for :(

Amen to that, Brother Marius.



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to