1 .\" Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua>
2 .\" at Electronni Visti IA, Kiev, Ukraine.
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" $FreeBSD: src/usr.bin/colldef/colldef.1,v 1.21 2004/05/19 09:45:46 ru Exp $
33 .Nd convert collation sequence source definition
42 utility converts a collation sequence source definition
43 into a format usable by the
48 It is used to define the many ways in which
49 strings can be ordered and collated.
53 its first argument and places the result in its second
55 The transformed string is such that it can be
56 correctly ordered with other transformed strings by using
63 function transforms its arguments and does a
68 utility reads the collation sequence source definition
69 from the standard input and stores the converted definition in filename.
70 The output file produced contains the
71 database with collating sequence information in a form
72 usable by system commands and routines.
74 The following options are available:
75 .Bl -tag -width indent
77 Set directory name where
79 files can be found, current directory by default.
86 The collation sequence definition specifies a set of collating elements and
87 the rules defining how strings containing these should be ordered.
88 This is most useful for different language definitions.
90 The specification file can consist of three statements:
98 statement is required.
104 supplied, these statements must be ordered as above.
106 statements after the order statement are ignored.
108 Lines in the specification file beginning with a
111 treated as comments and are ignored.
115 .Dl "charmap charmapfile"
118 defines where a mapping of the character
119 and collating element symbols to the actual
120 character encoding can be found.
126 names are separated from their values by TAB or
128 Symbol-value can be specified in
129 a hexadecimal (\ex\fI??\fR) or octal (\e\fI???\fR)
130 representation, and can be only one character in length.
132 .Bd -literal -offset indent
133 symbol-name1 symbol-value1
134 symbol-name2 symbol-value2
138 Symbol names cannot be specified in
144 statement is optional.
146 .Bd -literal -offset indent
147 substitute "symbol" with "repl_string"
152 statement substitutes the character
156 Symbol names cannot be specified in
161 statement is optional.
163 .Dl "order order_list"
166 is a list of symbols, separated by semi colons, that defines the
171 specifies, in a short-hand
172 form, symbols that are sequential in machine code
175 An order list element
176 can be represented in any one of the following
180 The symbol itself (for example,
182 for the lower-case letter
185 The symbol in octal representation (for example,
190 The symbol in hexadecimal representation (for example,
195 The symbol name as defined in the
203 If character map name have
205 character, it must be escaped as
219 are permitted in its usual C-language meaning.
221 The symbol chain (for example:
223 .Ar <letterA><letterB>c ,
226 The symbol range (for example,
229 Comma-separated symbols, ranges and chains enclosed in parenthesis (for example
236 same primary ordering but different secondary
239 Comma-separated symbols, ranges and chains enclosed in curly brackets (for example
245 are assigned the same primary ordering only.
248 The backslash character
250 is used for continuation.
251 In this case, no characters are permitted
252 after the backslash character.
256 utility exits with the following values:
257 .Bl -tag -width indent
259 No errors were found and the output was successfully created.
264 .Bl -tag -width indent
265 .It Pa /usr/share/locale/ Ns Ao Ar language Ac Ns Pa /LC_COLLATE
266 The standard shared location for collation orders