SGML::ISO8859 - routines for handling ISO 8859 character sets
use SGML::ISO8859; $sgml_str = SGML::ISO8859::str2sgml($data, $charset); $data = SGML::ISO8859::sgml2str($sgml_str, $charset);
SGML::ISO8859 contains routines for handling ISO 8859 character data for SGML related processing. The routines defined in the module can be specified during the use operator to import the routines into the current name space. For example:
use SGML::ISO8859 qw( &str2sgml &sgml2str );
SGML::ISO8859 supports the following character sets:
The following routines are available in SGML::ISO8859:
$sgml_str = str2sgml( $data, $charset );
String with all special characters translated to entity references.
str2sgml converts a string so any special characters are converted to the appropriate entity references. The characters '<', '>', and '&' will be converted also.
$data = sgml2str( $sgml_str, $charset );
The "raw" string.
sgml2str converts a string containing special character entity references into a "raw" string.
The mappings that SGML::ISO8859 uses for conversion are defined by the SGML::ISO8859::S# modules, where # is the character set number.
The following character sets, iso-8859-6 (Arabic) and iso-8859-8 (Hebrew), do not have any official ISO SGML character entity sets. SGML::ISO8859 uses an unoffical set. To see the mappings defined, see the SGML::ISO8859::S6 and SGML::ISO8859::S8 modules.
This software is part of the perlSGML package; see (http://www.oac.uci.edu/indiv/ehood/perlSGML.html)