Try OpenEdge Now
skip to main content
Internationalizing Applications
Using Multi-byte Code Pages : Issues specific to multi-byte code pages : Collating multi-byte characters

Collating multi-byte characters

When you sort multi-byte characters, you face a question that you do not face when sorting single-byte characters: In what order should the different types of characters sort? That is, should all one-byte characters sort before all two-byte characters? Should all two-byte characters sort before all three-byte characters? And how should the user-defined characters of the SHIFT-JIS code page sort?
The default collation table OpenEdge provides for the double-byte Asian languages (Chinese, Japanese, and Korean) sorts all single-byte characters before all double-byte characters. The following table shows how OpenEdge sorts Japanese characters.
Table 18. Japanese collation order by character type
Character type
Range of values
Single byte (ASCII)
Single byte (half-width Katakana)
Lead byte (range 1)
Lead byte (range 2)
User-defined (Gaiji)
Note: You can modify the sort order of lead bytes, though not the sort order of trail bytes. For more information on modifying the sort order of lead bytes, see the comments in the BASIC collation table for the SHIFT-JIS code page in the japanese.dat file in the OpenEdge/prolang/convmap directory.
* Sort order of trail bytes