Unicode::UTF8simple - Conversions to/from UTF8 from/to charactersets
use Unicode::UTF8simple; my $uref = new Unicode::UTF8simple; #convert a string (here: schön) to a utf8 byte string my $utf8string=$uref->toUTF8("iso-8859-1","schön"); #convert a string from utf-8 to specified encoding my $string=$uref->fromUTF8("iso-8859-1",$utf8string); #get a lit of supported encodings: my @listOfNames=$uref->enclist(); #check if a given encoding (here gb2312) is supported if ($uref->encsup('gb2312')){ ... }
Provides UTF-8 conversion for perl versions from 5.00 and up. It was mainly written for use with perl 5.00 to 5.6.0 because those perl versions do not support Unicode::MapUTF8 or Encode.
Unicode::UTF8simple is written in plain perl (no C code) and will work with any Perl 5 version. It is just slightly slower than Encode.
Guido Socher (guido at linuxfocus.org)
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'schön)'. Assuming CP1252
To install Unicode::UTF8simple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Unicode::UTF8simple
CPAN shell
perl -MCPAN -e shell install Unicode::UTF8simple
For more information on module installation, please visit the detailed CPAN module installation guide.