perl-unicode

Re: Make Encode.pm support the real UTF-8

2004-12-02 08:30:13
Bjoern Hoehrmann <derhoermi(_at_)gmx(_dot_)net> writes:

Hmm, maybe I should ask why you proposed to keep the old behavior of
encode_utf8 in the first place? The change would make more sense to
me if both encode("UTF-8" => ...) and encode_utf8(...) were changed.

I just wanted to keep the the ability still do the cheap encode/decode
where we just end up tweaking the SvUTF8 flag.  But we also have
utf8::encode() so I would not really mind if Encode::encode_utf8()
became strict.

The other rationale for this is that I think of "utf8" as the perl
extended version, while "UTF-8" is the standard interpretation.  I
could imagine having:

   encode("utf8", ...)    # perl extended UTF-8 
   encode_utf8(...)       # perl extended UTF-8
   encode("UTF-8", ...)   # the real thing.

Seems almost sane to me.

Regards,
Gisle