Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Text /
Chapter 5 - Text Utilities / Text Utilities Reference
Routines


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.

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.
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.

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, and TextOrder 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."
Table 5-13 Implicit language codes (Continued)
ConstantValueExplanation
systemCurLang-2Current language for system script (from 'itlb')
systemDefLang-3Default language for system script (from 'itlm')
currentCurLang-4Current language for current script (from 'itlb')
currentDefLang-5Default language for current script (from 'itlm')
scriptCurLang-6Current language for specified script (from 'itlb')
scriptDefLang-7Default language for specified script (from 'itlm')


Subtopics
ScriptOrder
LanguageOrder
StringOrder
TextOrder

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996