[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

National Language Support Guide and Reference

Converters Overview for Programming

National Language Support (NLS) provides a base for internationalization in which data often can be changed from one code set to another. Support of several standard converters for this purpose is provided. This section discusses the following aspects of conversion:

Data sent by one program to another program residing on a remote host may require conversion from the code set of the source machine to that of the receiver. For example, when communicating with a VM system, the workstation converts its ISO8859-1 data to an EBCDIC form.

Code sets define graphic characters and control character assignments to code points. These coded characters must also be converted when a program obtains data in one code set but displays it in another code set.

The system provides the following conversion interfaces:

iconv command
Allows you to request a specific conversion by naming the FromCode and ToCode code sets.
libiconv functions
Allows applications to request converters by name. For more information, see Understanding libiconv.

The system provides ready-to-use libraries of converters. The converter libraries are found in the /usr/lib/nls/loc/iconv/* and /usr/lib/nls/loc/iconvTable/* directories. Do not define your own converter unless absolutely necessary.

In addition to code set converters, the converter library also provides a set of network interchange converters. In a network environment, the code sets of the communications systems and the protocols of communication determine how the data should be converted.

Interchange converters are used to convert data sent from one system to another. Conversions from one internal code set to another code set require code set converters. When data must be converted from a sender's code set to a receiver's code set or from 8-bit data to 7-bit data, a uniform interface is required. The iconv subroutines provide this interface.

Standard Converters

The system supports standard converters for use with the iconv command and subroutines. The following are code set converter types:

Table converter
Converts single-byte stateless code sets. Performs a table translation from one byte to another byte. For more information, see PC, ISO, and EBCDIC Code Set Converters.
Algorithmic converter
Performs a conversion that cannot be implemented using a simple single-byte mapping table. All multibyte converters are implemented using this method. For more information, see Multibyte Code Set Converters.

The following are interchange converter types:

7-bit
Converts between internal code sets and ISO2022 standard interchange formats (7-bit). For more information, see Interchange Converters--7-bit.
8-bit
Converts between internal code sets and ISO2022 standard interchange formats (8-bit). For more information, see Interchange Converters--8-bit.
compound text
Converts between compound text and internal code sets. For more information, see Interchange Converters--Compound Text.
uucode
Provides the same mapping as that defined in the uuencode and uudecode command. For more information, see Interchange Converters--uucode.
UCS-2
Converts between UCS-2 and other code sets. For more information, see UCS-2 Interchange Converters.
UCS-4
Converts between UCS-4 and other code sets. For more information, see UCS-4 and UTF-32.
UTF-8
Converts between UTF-8 and other code sets. For more information, seeUTF-8 Interchange Converters.
UTF-16
Converts between UTF-16 and other code sets. For more information, seeUTF-16.
UTF-32
Converts between UTF-32 and other code sets. For more information, seeUCS-4 and UTF-32.

Low-level converters can be used by some of the interchange converters. For a list of these converters, see Miscellaneous Converters.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]