The conversion configuration file

The conversion configuration file for a character set specifies how conversions to other character sets should take place. Among other things, it indicates whether a conversion is table- or algorithm-driven.

For more information about the conversion process, see Chapter 4, “Coded Character Set Conversion Support.”


Conversion configuration file sections and entries

Conversion configuration files contain:

The conversion section contains entries that describe how conversion to a particular character set should take place. Conversion section entries can indicate either table-driven or algorithm-driven conversion.

Table-driven entries have the following form:

[conversion]
     convertto = dest_charset, table, mode, replacement_char

where:

Table B-1: Coded character set conversion modes

Value

Description

MATCH

Shipped files contain this value.

The conversion process converts matching source and destination values.

If the code for a source character is illegal or unmappable, the conversion process uses the destination replacement character that is defined in the conversion configuration file.

BESTGUESS

The conversion process converts matching and best-guess source and destination values.

If the code for a source character is illegal or unmappable, the conversion process uses the destination replacement character that is defined in the conversion configuration file.

MNEMONIC

Converts matching source and destination values. If there is no match for a source value, the conversion process uses a Unicode mnemonic string as the destination value. If there is no suitable mnemonic string, the conversion process uses a Unicode hexadecimal string as the destination value.

If the code for a source character is illegal, the conversion process uses the destination replacement character that is defined in the conversion configuration file.

Algorithm-driven entries have the following form:

[conversion]
     convertto = dest_charset, sys_algorithm, multiplier

where:


Conversion configuration file example

The following example shows a conversion configuration file:

; Conversion Configuration File for iso_1 charset.
 [conversion]
 convertto = utf8, table, MATCH, 3F
 convertto = cp850, sys-algorithm, 1
 convertto = cp437, sys-algorithm, 1
 convertto = roman8, sys-algorithm, 1
 convertto = mac, sys-algorithm, 1