Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



The Character Set Conversion Data Generator

The cnvtool utility creates a C++ file which contains an SCnvConversionData data structure and optionally, a function returning the replacement for unconvertible Unicode characters. The generated SCnvConversionData data structure contains the character set conversion data.

Both of these can be accessed from the hand-written C++ code by including \epoc32\include\convgeneratedcpp.h. Note that if the cnvtool command-line included the -omitReplacementForUnconvertibleUnicodeCharacters flag, the descriptor-returning function cannot be used.

The cnvtool-generated C++ file is compiled along with the hand-written C++ file to produce the character conversion plug-in DLL.

The input to cnvtool is two text files. These are known as the source file and the control file. The source file contains a table of pairs of hexadecimal numbers. The first number in each pair is the encoding of a character in the foreign character set, and the second is the Unicode encoding of the same character. The control file specifies the conversion algorithms to convert (both ways) between ranges of characters, and other information.