perlSGML -- SGML::ISO8859

%perlSGML; ]>

## 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:

- us-ascii,
- iso-8859-1 (Latin-1),
- iso-8859-2 (Latin-2),
- iso-8859-3 (Latin-3),
- iso-8859-4 (Latin-4),
- iso-8859-5 (Cyrillic),
- iso-8859-6 (Arabic),
- iso-8859-7 (Greek),
- iso-8859-8 (Hebrew),
- iso-8859-9 (Latin-5),
- iso-8859-10 (Latin-6).

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

- 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.

## See Also

perl(1)

&avail; &author;