NAME

MHonArc::Encode - Text encoding routines for MHonArc

SYNOPSIS

<TextEncode>
charset; MHonArc::Encode::from_to; MHonArc/Encode.pm
</TextEncode>

DESCRIPTION

MHonArc::Encode provides support for converting text in one encoding to text in another encoding.

If you converting all data into utf-8, it is recommended to use the MHonArc::UTF8 module instead.

FUNCTIONS

MHonArc::Encode::from_to($data_ref, $from_charset, $to_charset)

This function is designed to be registered to the TEXTENCODE resource:

<TextEncode>
charset; MHonArc::Encode::from_to; MHonArc/Encode.pm
</TextEncode>

Converts $data_ref encoded in $from_charset into $to_charset). $data_ref should be a reference to a scalar string. Conversion is done in-place.

undef is returned if conversion from $from_charset to $to_charset) is not supported.

NOTES

  • If available, the Encode module is used for converting the text. If not available, the Unicode::MapUTF8 module is used.

    The Encode module is only provided with Perl 5.8, and later. The Unicode::MapUTF8 module is available via CPAN, but require Perl 5.6, or later.

SEE ALSO

MHonArc::UTF8

The TEXTENCODE and CHARSETCONVERTERS resources in the MHonArc documentation.

VERSION

$Id: Encode.pm,v 1.2 2002/12/20 08:01:11 ehood Exp $

AUTHOR

Earl Hood, earl@earlhood.com

MHonArc comes with ABSOLUTELY NO WARRANTY and MHonArc may be copied only under the terms of the GNU General Public License, which may be found in the MHonArc distribution.