Important: The information in this document is obsolete and should not be used for new development.
Determining Sorting Order for Strings in Different Languages
This section describes the Text Utilities routines available to help you sort strings in different languages. When strings from different languages occur in a single list, you must separate the strings so that all strings from each script system are contained in their own list. You then sort the list for each script system, using the sorting rules for that language and script system. You can then concatenate the individual language lists together, ordering the lists according to language and script ordering information that is found in the international script-sorting ('itlm'
) resource.
- The
ScriptOrder
function indicates the order in which text from two different script systems should be sorted.- The
LanguageOrder
function indicates the order in which text from two different languages from the same script system should be sorted.- The
StringOrder
function determines the appropriate sorting order for two Pascal strings, taking into account the script and language codes of each.- The
TextOrder
function determines the appropriate sorting order for two text strings, taking into account the script and language codes of each.
Script systems and the enabling and installing of scripts are described in the chapter "Script Manager" in this book and the script-sorting resource is described in the appendix "International Resources" in this book.
- Note
- When determining the order in which text from two different script systems should be sorted, the system script always sorts first, and scripts that are not enabled and installed always sort last. Invalid script or language codes always sort after valid ones.
Pascal strings are stored using standard Pascal string representation, which precedes the text characters with a length byte; these strings are limited to 255 characters. Text strings do not use a length byte and can be up to 32 KB in length. Pascal strings are passed directly as parameters, while text strings are specified by two parameters: an address value and an integer length value.
The functions
LanguageOrder
,StringOrder
, andTextOrder
accept as parameters the implicit language codes listed in Table 5-13, as well as the explicit language codes listed in the chapter "Script Manager."
Subtopics
- ScriptOrder
- LanguageOrder
- StringOrder
- TextOrder