NAME

Locale::Iconv - Perl interface to the XPG4 iconv() function

SYNOPSIS

use Locale::Iconv;
$converter = Locale::Iconv->new("fromcode", "tocode");
$converted = $converter->convert("Text to convert");

DESCRIPTION

The Locale::Iconv module provides a Perl interface to the iconv() function as defined by the X/Open Single UNIX Specification (XPG4). The convert() method converts the encoding of characters in the input string from the fromcode code set to the tocode code set, and returns the result.

Settings of fromcode and tocode and their permitted combinations are implementation-dependent. Valid values are specified in the system documentation

Interoperability

Locale::Iconv can be used with Gisle Aas' Unicode module (available from CPAN) to convert between Unicode and other character sets, provided that there are Unicode conversion tables on the system.

ERRORS

If the conversion can't be initialized an error is generated (using croak()). If an error occurs in the conversion a warning describing the problem is emitted (using warn()) and undef is returned.

Consult iconv(3) for details on errors that might occur.

NOTES

The quality of the conversion is system-dependent.

AUTHOR

Michael Piotrowski, mxp@linguistik.uni-erlangen.de

SEE ALSO

perl(1), iconv(3), Unicode::String(3).