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 /
Appendix B - International Resources


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, and CompareText call the Text Utilities sorting hooks. The Text Utilities routines CharacterType, FindWordBreaks, LowercaseText, UppercaseText, StripDiacritics, and UppercaseStripDiacritics, and the Script Manager function TransliterateText, 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 the itlbSort field of the script's international bundle resource (type 'itlb').

Note
The resource template used by Rez and DeRez 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.
Each string-manipulation resource contains the following elements:

The string-manipulation resource described in this section is sometimes called the extended '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

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996