Re: utf8 horror stories

Autrijus Tang <[email protected]>
Newsgroups gmane.comp.web.mason.devel
Message-ID <[email protected]>
On Thu, Sep 16, 2004 at 02:43:53PM -0600, John Williams wrote:
> On Fri, 17 Sep 2004, Autrijus Tang wrote:
> > On Thu, Sep 16, 2004 at 12:52:19PM -0600, John Williams wrote:
> > > Perl desperately needs a "default-to-utf8" mode.
> >
> > It's called "use encoding 'utf8';".  It's also subtly enabling
> > lots of other knobs.  See encoding::warnings on CPAN for details.
> 
> Have you actually tried it?

Why yes, I'm one of its authors. :)

> That only sets your source file and STDIN/STDOUT to utf8.

Yes, but it enables utf8 semantics globally instead of the default
latin1 promotion, so high-bit characters you read from other handles
will be treated correctly when joined with utf8 data.

> "use open ':utf8'" will fix your other files, but only lexically, so other
> modules you use will still give you non-utf8 strings.

That is correct.  There are no good solution for it save for overriding
CORE::open.

Thanks,
/Autrijus/
signature.asc (application/pgp-signature, 187 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQFBSfxftLPdNzw1AaARAszHAJwPkgywlebiOib2lI2KOCgDpmezMgCghHes
VhCn2adjWD4aloF6UTuJ9tY=
=t8jJ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.