Go to the first, previous, next, last section, table of contents.


Generic Charset Conversion

The conversion functions mentioned so far in this chapter all had in common that they operate on character sets which are not directly specified by the functions. The multibyte encoding used is specified by the currently selected locale for the LC_CTYPE category. The wide character set is fixed by the implementation (in the case of GNU C library it always is UCS-4 encoded ISO 10646.

This has of course several problems when it comes to general character conversion:

The XPG2 standard defines a completely new set of functions which has none of these limitations. They are not at all coupled to the selected locales and they but no constraints on the character sets selected for source and destination. Only the set of available conversions is limiting them. The standard does not specify that any conversion at all must be available. It is a measure of the quality of the implementation.

In the following text first the interface to iconv, the conversion function, will be described. Comparisons with other implementations will show what pitfalls lie on the way of portable applications. At last, the implementation is described as far as interesting to the advanced user who wants to extend the conversion capabilities.


Go to the first, previous, next, last section, table of contents.