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')


Supplying Custom Sorting Routines

String comparison in a given script system is controlled by routines accessed through the sorting hooks in the string-manipulation resource. However, there is also a default sorting behavior built into the Text Utilities, and the sorting hooks are designed to allow a given script system to use, modify, or replace parts of that default behavior, on a character-by-character basis. The U.S. version of the Roman script system, for example, uses the built-in sorting behavior exclusively; its 'itl2' resource has only nonfunctional (empty) sorting hooks. The built-in sorting behavior used by the Text Utilities is described in the appendix "Built-in Script Support" in this book.

The sorting hooks are described under "The 'itl2' Sorting Hooks" on page B-37. You can supply a replacement string-manipulation resource with nonempty versions of any sorting hooks, to create sorting behavior more appropriate for your target region.

Note
Even "empty" sorting hooks cannot be completely empty. All 'itl2' sorting hooks are responsible for setting the condition codes that indicate whether or not they have taken any sorting action. If these condition codes have not been set, the Text Utilities uses the default Roman sorting behavior.
For more information on replacing any or all of the sorting hooks, see Macintosh Technical Note #178, available from Macintosh Developer Technical Support.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996