Ed Avis > Convert-Recode-1.04 > Convert::Recode

Download:
Convert-Recode-1.04.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 1.04   Source  

NAME ^

Convert::Recode - make mapping functions between character sets

SYNOPSIS ^

  use Convert::Recode qw(ebcdic_to_ascii);

  while (<>) {
     print ebcdic_to_ascii($_);
  }

DESCRIPTION ^

The Convert::Recode module can provide mapping functions between character sets on demand. It depends on GNU recode to provide the raw mapping data, i.e. GNU recode must be installed first. The names of the mapping functions are found by taking the name of the two charsets and then joining them with the string "_to_". If you want to convert between the "mac" and the "latin1" charsets, then you just import the mac_to_latin1() function.

If you prefix the function name with "strict_" then characters that can not be mapped are removed during transformation. For instance the strict_mac_to_latin1() function will convert to a string to latin1 and remove all mac characters that have not corresponding latin1 character.

Running the command recode -l should give you the list of character sets available.

AUTHOR ^

Written by and © 1997 Gisle Aas. Small fixes © 2000 Ed Avis, <epa98@doc.ic.ac.uk>.

syntax highlighting: