Name

SGML::ISO8859 - routines for handling ISO 8859 character sets


Synopsis

  use SGML::ISO8859;

  $sgml_str = SGML::ISO8859::str2sgml($data, $charset);
  $data     = SGML::ISO8859::sgml2str($sgml_str, $charset);

Description

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:


str2sgml

    $sgml_str =
    str2sgml(
	$data,
	$charset
    );

Parameters:

$data
The scalar string to convert.
$charset
The character set of the string.

Return:

String with all special characters translated to entity references.

Description:

str2sgml converts a string so any special characters are converted to the appropriate entity references. The characters '<', '>', and '&' will be converted also.


sgml2str

    $data =
    sgml2str(
	$sgml_str,
	$charset
    );

Parameters:

$sgml_str
The scalar string to convert.
$charset
The character set to convert string to.

Return:

The "raw" string.

Description:

sgml2str converts a string containing special character entity references into a "raw" string.


Notes


See Also

perl(1)


Availability

This software is part of the perlSGML package; see (http://www.oac.uci.edu/indiv/ehood/perlSGML.html)


Author

Earl Hood
ehood@medusa.acs.uci.edu
Copyright © 1997

97/09/18 14:32:45