Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)

File Format Reference Pages locale(4)
be dened in the provided character set description source le (charmap).
A character literal is the character itself, or else a decimal, hexadecimal, or octal constant. A
decimal constant is of the following form:
\dddd
where d is a decimal digit. A hexadecimal constant is of the following form:
\xxxx
where x is a hexadecimal digit. An octal constant is of the following form:
\ooo
where o is an octal digit.
The explicit denition of each category in a locale denition source le is not required. When a
category is undened in a locale denition source le, it defaults to the C locale denition.
The LC_COLLATE Category
The LC_COLLATE category denes the relative order between collating elements.
A collation element is the unit of comparison for collation. A collation element may be a charac-
ter or a sequence of characters. Every collation element in the locale has a set of weights, which
determine if the collation element collates before, equal to, or after the other collation elements
in the locale. Each collation element is assigned collation weights by the localedef command
when the locale denition source le is compiled. These collation weights are then used by
applications programs that compare strings.
Comparison of strings is performed by comparing the collation weights of each character in the
string until either a difference is found or the strings are determined to be equal. This com-
parison may be performed several times if the locale denes multiple collation orders. For exam-
ple, in the French locale, the strings are compared using a primary set of collation weights. If
they are equal on the basis of this comparison, they are compared again using a secondary set of
collation weights. A collating element has a set of collation weights associated with it that is
equal to the number of collation orders dened for the locale.
Every character dened in the charmap le (or every character in the portable character set if no
charmap le is specied) is itself a collating element. Additional collating elements can be
dened using the collating-element statement. The syntax is as follows:
collating-element <character_symbol> from <string>
The LC_COLLATE category begins with the keyword LC_COLLATE and ends with the END
LC_COLLATE keyword.
The following keywords are recognized in the LC_COLLATE category:
collating-element
The collating-element statement is used to specify multicharacter collating elements.
The character_symbol argument denes a collating element that is a string of one or
more characters as a single collating element. The character_symbol argument cannot
duplicate any symbolic name in the current charmap le, or any other symbolic name
dened in this collation denition. The string argument species a string of two or
more characters that dene the character_symbol argument. The following are exam-
ples of the syntax for the collating-element statement:
collating-element <ch> from <c><h>
collating-element <e-acute> from <acute><e>
collating-element <11> from <1><1>
527188-007 Hewlett-Packard Company 1111