Internationalization Module User’s Guide : Chapter 6 Collation : Customizing a Collator : Forming Collation Weights
Forming Collation Weights
RWUCollator provides methods for controlling the process of forming collation weights for each collation element.
Case Order
The setCaseOrder() method controls the relative order of cased letters. For most locales, the default value of this attribute is RWUCollator::Normal, indicating that tertiary weights should be taken directly from the Unicode Collation Charts; a lower-case letter is usually ordered before the upper-case, superscript, circled, or other versions of the same letter. For the Latvian locale, the default case order is RWUCollator::UpperFirst, causing all upper-case versions of a letter to be ordered before all lower-case versions.
The getCaseOrder() method returns the current case order associated with the collator.
Punctuation Shifting
The enablePunctuationShifting() method causes whitespace and punctuation to be ignored at the primary, secondary, and tertiary levels, and to be considered significant only at the quaternary level. Punctuation shifting is disabled by default.
The isEnabledPunctuationShifting() method returns true if punctuation shifting is currently enabled; otherwise, false.