### Convert Character Coding

You can convert data that is encoded in one code set into another code set. The translation is controlled by a code set converter. You can use one of the conversion tables provided with VisualAge for C++, or you can create your own table.

Use the ICONV utility to convert a file from one code set encoding to another. The ICONV utility reads characters from the input file, converts them from one coded character set definition to another, and writes them to the output file.

Input to the ICONV utility consists of a character string representing the input code page and a character string representing the target code page. To determine the input code page, use the cstoccsid and ccsidtocs functions. cstoccsid returns the corresponding CCSID of the code page specified by the codeset parameter, where CCSIDs are registered IBM coded character set IDs. ccsidtocs returns the corresponding code page name of the CCSID specified by the ccsid parameter.

In a C or C++ program, you can call the functions`` iconv_open, iconv, and iconv_close`` to initialize and perform the character conversions from one character set encoding to another. These functions are also used by the ICONV utility.

If you need to generate a translation table for use by the ICONV utility and `iconv` functions, use the ICONVDEF utility This utility reads a source translation file from a specified input file and writes the compiled version to a specified output file. If you do not specify an input or output file, ICONVDEF uses standard input (stdin) and standard output (stdout). The source translation file contains directives that are acted upon by the ICONVDEF utility to produce the compiled version of the translation table.

Internationalization

Make Your Program International

Code Set Converters Supplied
ICONVDEF Utility
ICONV Utility