Try OpenEdge Now
skip to main content
Internationalizing Applications
Preparing the Code : Sorting data : Local conventions

Local conventions

Ordering of character data is regulated by language rules and cultural conventions. For example, Japanese scholars have one system for ordering and classifying Kanji characters, but in a business context (a Tokyo telephone directory, for example) other conventions apply. European languages and countries present some of the same issues. Be sure to research the ordering conventions that affect character data in the locales where you plan to run your application.
Consider German, which uses many of the 256 characters present in a common European character set. The base alphabet (A to Z) is extended by the Umlaut (Ä, Ö, Ü) and ß. Truly localized applications for German-speaking countries cannot default to sorting these characters based on their value in a code page. Each country has its own conventions for ordering these special characters. A dictionary published in Germany considers A and Ä to be interchangeable for ordering purposes. A Swiss-German dictionary, however, lists all words beginning with A before all words beginning with Ä.
You can control the order in which OpenEdge sorts and compares character data by using OpenEdge collations and International Components for Unicode (ICU) collations. A collation assigns values to characters; OpenEdge uses these values to weight a character in a sort order. For example, code page ISO8859-1 assigns the Ä the value 196 and assigns A the value 65. If character data were sorted according to the values in the code page, all customers whose names begin with Ä would appear after those whose names begin with Z, which is not the order an analyst in Frankfurt expects. In Germany, A and Ä are commonly sorted together. A collation table for Germany would assign 65 and 196 proximate sort weights.
Your application might require converting all character data to uppercase or lowercase before it is processed or stored. When the ABL CAPS and LC functions perform these case conversions, OpenEdge uses a case table to match a character to its uppercase or lowercase equivalent.