Important: The information in this document is obsolete and should not be used for new development.
String-Manipulation Resource (Type 'itl2')
The string-manipulation resource (resource type'itl2'
) is used by the Text Utilities and the Script Manager for defining and comparing text elements.The string-manipulation resource contains routines, called sorting hooks, that perform string sorting; it also contains tables that define character type, case conversion, and word boundaries. The Text Utilities routines
IdenticalString
,IdenticalText
,CompareString
, andCompareText
call the Text Utilities sorting hooks. The Text Utilities routinesCharacterType
,FindWordBreaks
,LowercaseText
,UppercaseText
,StripDiacritics
, andUppercaseStripDiacritics
, and the Script Manager functionTransliterateText
, may make use of tables in the string-manipulation resource.By replacing the sorting hooks, you can modify the way string comparisons are made;
by replacing tables in the string-manipulation resource, you can modify how word boundaries are determined. See the sections "Supplying Custom Sorting Routines" on page B-43, and "Supplying Custom Word-Break Tables" on page B-44, for more information.Each enabled script system has one or more string-manipulation resources. The resource ID for each one is within the range of resource ID numbers for that script system. The default
'itl2'
resource for a script is specified in theitlbSort
field of the script's international bundle resource (type'itlb'
).
Each string-manipulation resource contains the following elements:
- Note
- The resource template used by
Rez
andDeRez
specifies a particular ordering of code and tables in the string-manipulation resource, although that order is not required for the resource to be used correctly.
The string-manipulation resource described in this section is sometimes called the extended
- header
- string comparison routines (sorting hooks)
- character-type tables (optional)
- case-conversion and stripping tables (optional)
- word break tables
- subscript table (optional)
'itl2' resource
. Prior to Macintosh system software version 6.0.4, a more abbreviated'itl2'
version was supported. That original'itl2'
resource consisted of the header and sorting hooks only. The full resource as documented here is supported by system software versions 7.0 and later.
Subtopics
- Resource Header
- The 'itl2' Sorting Hooks
- The 'itl2' Tables
- Supplying Custom Sorting Routines
- Supplying Custom Word-Break Tables