Locale::Recode is a Perl object-oriented portable charset conversion class.
$cd = Locale::Recode->new (from => 'UTF-8',
to => 'ISO-8859-1');
die $cd->getError if $cd->getError;
$cd->recode ($text) or die $cd->getError;
$mime_name = Locale::Recode->resolveAlias ('latin-1');
$supported = Locale::Recode->getSupported;
$complete = Locale::Recode->getCharsets;
This module provides routines that convert textual data from one codeset to another in a portable way. The module has been started before Encode(3) was written. It's main purpose today is to provide charset conversion even when Encode(3) is not available on the system. It should also work for older Perl versions without Unicode support.
Internally Locale::Recode(3) will use Encode(3) whenever possible, to allow for a faster conversion and for a wider range of supported charsets, and will only fall back to the Perl implementation when Encode(3) is not available or does not support a particular charset that Locale::Recode(3) does.
Locale::Recode(3) is part of libintl-perl, and it's main purpose is actually to implement a portable charset conversion framework for the message translation facilities described in Locale::TextDomain(3).