Try OpenEdge Now
skip to main content
Internationalizing Applications
Understanding Character Processing Tables : The convmap.dat file and its tables : Code-page conversion tables : Converting to and from UTF-8
 
Converting to and from UTF-8
If you add a new code-page conversion table that converts to UTF-8 (an encoding of Unicode), you must set the correct value for TYPE. As shown in , this number appears at the top of the code-page conversion table, to the right of the literal TYPE, in the double quotes.
The value you supply for TYPE depends on whether the non-UTF-8 code page is single byte or double byte, as shown in the following table.
Table 2. Converting to UTF-8
Conversion
Value for TYPE
From a single-byte code page to UTF-8
19
From a double-byte code page to UTF-8
17
For example, to convert from ISO8859-1, a single-byte code page, to UTF-8, set TYPE to 19.
When you compile code-page conversion tables for converting to UTF-8, OpenEdge automatically computes the inverse conversions and assigns the correct value for TYPE, as shown in the following table.
Table 3. Converting from UTF-8
Conversion
Value for TYPE
From UTF-8 to a single-byte code page
20
From UTF-8 to a double-byte code page
18
For more information on multi-byte code pages, see UsingMulti-byte Code Pages and Using Unicode.