[rt-devel] Localization

Autrijus Tang autrijus at autrijus.org
Fri Jun 7 16:51:50 EDT 2002

On Fri, Jun 07, 2002 at 08:06:48AM -0500, anyoung at us.ibm.com wrote:
> I'm sorry to come into this conversation midway, but what is Encode.pm and 
> where can I get a copy of it?  Is it available on CPAN?

Yes. But currently, you'll need perl v5.7.3 or later (5.8-RC is preferred)
to use it. I am aware of no existing efforts to backport it to 5.6.x.

Encode.pm is behind most of the PerlIO-layer features, which is a main
advantage of 5.8 over previous perls. For example:

    open $fh, '<:encoding(euc-jp)', $jpn_file;
    print <$fh>; # utf

> I've got an interesting problem that might be solved for now by a library that
> can take a byte string encoded in an odd encoding, say EUC_JP, and stuff it 
> into the proper Perl UTF-8 string.

Text::Iconv does that. But Encode.pm takes care of some more esoteric encodings,
as well as providing tighter perl-level integration.  For example, length() and
regexen are all capable of processing utfstrings.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://pallas.eruditorum.org/pipermail/rt-devel/attachments/20020608/4227713d/attachment.pgp

More information about the Rt-devel mailing list