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

use encoding

Thread Next
Juerd Waalboer
March 3, 2007 15:45
use encoding
Message ID:
Again re unicode documentation,

"use encoding" causes a lot of confusion, because of some severe
caveats, and I always advise people to avoid using it

However, many PODs refer to it. I think that's a huge problem.

* assumes that the environment of the programmer, equals
that of the end user: STDIO and source code use the same encoding.

* alters interpretation of \x: it makes it hard
(impossible?) to use a character that is in latin1, but not in the
specified encoding.

* makes every string literal internally UTF8 encoded, which
means that $jpeg_image_data."" upgrades $jpeg_image_data, assuming it
was latin1 before.

I see several possible solutions.

* is fixed (can this be done? Who can do this?)

* is documented as broken, or at least gets even more
caveats listed.

In both cases, I think it would help if we removed a lot of references
to; it's currently just too dangerous. Let it stay there for
compatibility/historic reasons, but try to avoid that new users start
using it.

But before I do something huge like remove all (almost all) references
to from other pods, I'd like to know if there's any plan for already.

korajn salutojn,

  juerd waalboer:  perl hacker  <>  <>
  convolution:     ict solutions and consultancy <>

Ik vertrouw stemcomputers niet.
Zie <>.

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