672 xargs doesn't support -0
[illumos-gate.git] / usr / src / man / man1 / localedef.1
blobcc11cf825c8feadbf3136cd51273f0ef3c257e4a
1 '\" te
2 .\" Copyright (c) 1992, X/Open Company Limited  All Rights Reserved
3 .\" Portions Copyright (c) 2003, Sun Microsystems, Inc.  All Rights Reserved
4 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
5 .\" http://www.opengroup.org/bookstore/.
6 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
7 .\"  This notice shall appear on any product containing this material.
8 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
9 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
10 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
11 .TH LOCALEDEF 1 "Oct 11, 2004"
12 .SH NAME
13 localedef \- define locale environment
14 .SH SYNOPSIS
15 .LP
16 .nf
17 \fBlocaledef\fR [\fB-c\fR] [\fB-C\fR \fIcompiler_options\fR] [\fB-f\fR \fIcharmap\fR]
18      [\fB-i\fR \fIsourcefile\fR] [\fB-L\fR \fIlinker_options\fR] [\fB-m\fR \fImodel\fR]
19      [\fB-u\fR \fIcode_set_name\fR] [\fB-W\fR cc, \fIarg\fR] [\fB-x\fR \fIextensions_file\fR] \fIlocalename\fR
20 .fi
22 .SH DESCRIPTION
23 .sp
24 .LP
25 The \fBlocaledef\fR utility converts source definitions for locale categories
26 into a format usable by the functions and utilities whose operational behavior
27 is determined by the setting of the locale environment variables; see
28 \fBenviron\fR(5).
29 .sp
30 .LP
31 The utility reads source definitions for one or more locale categories
32 belonging to the same locale from the file named in the \fB-i\fR option (if
33 specified) or from standard input.
34 .sp
35 .LP
36 Each category source definition is identified by the corresponding environment
37 variable name and terminated by an \fBEND\fR \fIcategory-name\fR statement. The
38 following categories are supported.
39 .sp
40 .ne 2
41 .na
42 \fB\fBLC_CTYPE\fR\fR
43 .ad
44 .RS 15n
45 Defines character classification and case conversion.
46 .RE
48 .sp
49 .ne 2
50 .na
51 \fB\fBLC_COLLATE\fR\fR
52 .ad
53 .RS 15n
54 Defines collation rules.
55 .RE
57 .sp
58 .ne 2
59 .na
60 \fB\fBLC_MONETARY\fR\fR
61 .ad
62 .RS 15n
63 Defines the format and symbols used in formatting of monetary information.
64 .RE
66 .sp
67 .ne 2
68 .na
69 \fB\fBLC_NUMERIC\fR\fR
70 .ad
71 .RS 15n
72 Defines the decimal delimiter, grouping and grouping symbol for non-monetary
73 numeric editing.
74 .RE
76 .sp
77 .ne 2
78 .na
79 \fB\fBLC_TIME\fR\fR
80 .ad
81 .RS 15n
82 Defines the format and content of date and time information.
83 .RE
85 .sp
86 .ne 2
87 .na
88 \fB\fBLC_MESSAGES\fR\fR
89 .ad
90 .RS 15n
91 Defines the format and values of affirmative and negative responses.
92 .RE
94 .SH OPTIONS
95 .sp
96 .LP
97 The following options are supported:
98 .sp
99 .ne 2
101 \fB\fB-c\fR\fR
103 .RS 23n
104 Creates permanent output even if warning messages have been issued.
108 .ne 2
110 \fB\fB-C\fR \fIcompiler_options\fR\fR
112 .RS 23n
113 Passes the \fIcompiler_options\fR to the C compiler (\fBcc\fR). If more than
114 one option is specified, then the options must be enclosed in quotes
115 (\fB"\|"\fR).
117 This is an old option. Use the \fB-W\fR \fBcc\fR,\fIarg\fR option instead.
121 .ne 2
123 \fB\fB-f\fR \fIcharmap\fR\fR
125 .RS 23n
126 Specifies the pathname of a file containing a mapping of character symbols and
127 collating element symbols to actual character encodings. This option must be
128 specified if symbolic names (other than collating symbols defined in a
129 \fBcollating-symbol\fR keyword) are used. If the \fB-f\fR option is not
130 present, the default character mapping will be used.
134 .ne 2
136 \fB\fB-i\fR \fIsourcefile\fR\fR
138 .RS 23n
139 The path name of a file containing the source definitions. If this option is
140 not present, source definitions will be read from standard input.
144 .ne 2
146 \fB\fB-L\fR \fIlinker_options\fR\fR
148 .RS 23n
149 Passes the \fIlinker_options\fR to the C compiler (\fBcc\fR) that follows the C
150 source filename. If more than one option is specified, then the options must be
151 enclosed in quotes (\fB"\|"\fR).
153 This is an old option. Use the \fB-W\fR \fBcc\fR,\fIarg\fR option instead.
157 .ne 2
159 \fB\fB-m\fR \fImodel\fR\fR
161 .RS 23n
162 Specifies whether \fBlocaledef\fR will generate a 64-bit or a 32-bit locale
163 object.
165 Specify \fImodel\fR as \fBilp32\fR to generate a 32-bit locale object. Specify
166 \fBlp64\fR to generate a 64-bit locale object. If the \fB-m\fR option is not
167 specified, \fBlocaledef\fR generates a 32-bit locale object. And if no other
168 options than \fB-c\fR, \fB-f\fR, and \fB-i\fR options are specified and if the
169 system running \fBlocaledef\fR supports the 64-bit environment, \fBlocaledef\fR
170 additionally generates a 64-bit locale object.
174 .ne 2
176 \fB\fB-u\fR \fIcode_set_name\fR\fR
178 .RS 23n
179 Specifies the name of a codeset used as the target mapping of character symbols
180 and collating element symbols whose encoding values are defined in terms of the
181 ISO/IEC 10646-1: 2000 standard position constant values. See NOTES.
185 .ne 2
187 \fB\fB-W\fR \fBcc\fR,\fIarg\fR\fR
189 .RS 23n
190 Passes \fIarg\fR options to the C compiler. Each argument must be separated
191 from the preceding by only a comma. A comma can be part of an argument by
192 escaping it withan immediately preceding backslash character; the backslash is
193 removed from the resulting argument.
195 Use this option instead of the \fB-C\fR and \fB-L\fR options.
199 .ne 2
201 \fB\fB-x\fR \fIextensions_file\fR\fR
203 .RS 23n
204 Specifies the name of an extension file where various \fBlocaledef\fR options
205 are listed. See \fBlocale\fR(5).
208 .SH OPERANDS
211 The following operand is supported:
213 .ne 2
215 \fB\fIlocalename\fR\fR
217 .RS 14n
218 Identifies the locale. If the name contains one or more slash characters,
219 \fIlocalename\fR will be interpreted as a path name where the created locale
220 definitions will be stored. This capability may be restricted to users with
221 appropriate privileges. (As a consequence of specifying one \fIlocalename\fR,
222 although several categories can be processed in one execution, only categories
223 belonging to the same locale can be processed.)
226 .SH OUTPUT
229 \fBlocaledef\fR creates a temporary C source file that represents the locale's
230 data. \fBlocaledef\fR then calls the C compiler to compile this C source file
231 into a shared object.
234 If the \fB-m\fR \fBilp32\fR option is specified, \fBlocaledef\fR calls the C
235 compiler for generating 32-bit objects and generates a 32-bit locale object. If
236 the \fB-m\fR \fBlp64\fR option is specified, \fBlocaledef\fR calls the C
237 compiler for generating 64-bit objects and generates a 64-bit locale object.
240 If the \fB-m\fR option is not specified, \fBlocaledef\fR calls the C compiler
241 for generating 32-bit objects and generates a 32-bit locale object. If no other
242 options than \fB-c\fR, \fB-f\fR, and \fB-i\fR options are specified and if the
243 system running \fBlocaledef\fR supports the 64-bit environment, \fBlocaledef\fR
244 additionally calls the C compiler for generating 64-bit objects and generates a
245 64-bit locale object.
248 If no option to the C compiler is explicitly specified using the \fB-W\fR,
249 \fB-C\fR, or \fB-L\fR options, \fBlocaledef\fR calls the C compiler with
250 appropriate C compiler options to generate a locale object or objects.
253 If the \fB-m\fR \fBilp32\fR option is specified, \fBlocaledef\fR generates a
254 32-bit locale object named:
257 \fIlocalename\fR.so.\fIversion_number\fR
260 If the \fB-m\fR \fBlp64\fR option is specified, \fBlocaledef\fR generates a
261 64-bit locale object named:
264 \fIlocalename\fR.so.\fIversion_number\fR
267 If the \fB-m\fR option is not specified, \fBlocaledef\fR generates a 32-bit
268 locale object named:
271 \fIlocalename\fR.so.\fIversion_number\fR
274 and, if appropriate, generates a 64-bit locale object named:
277 \fI64-bit_architecture_name\fR/\fIlocalename\fR.so.\fIversion_number\fR
280 The shared object for the 32-bit environment must be moved to:
283 \fB/usr/lib/locale/\fR\fIlocalename\fR\fB/\fR\fIlocalename\fR\fB\&.so.\fR\fIver
284 sion_number\fR
287 The shared object for the 64-bit environment on SPARC must be moved to:
290 \fB/usr/lib/locale/\fR\fIlocalename\fR\fB/sparcv9/\fR\fIlocalename\fR\fB\&.so.\fR\fIversion_number\fR
293 The shared object for the 64-bit environment on AMD64 must be moved to:
296 \fB/usr/lib/locale/\fIlocalename\fR/amd64/\fIlocalename\fR\&.so.\fIversion_number\fR\fR
299 \fBlocaledef\fR also generates a text file named \fIlocalename\fR that is used
300 for information only.
301 .SH ENVIRONMENT VARIABLES
304 See \fBenviron\fR(5) for definitions of the following environment variables
305 that affect the execution of \fBlocaledef\fR: \fBLANG\fR, \fBLC_ALL\fR,
306 \fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
307 .SH EXIT STATUS
310 The following exit values are returned:
312 .ne 2
314 \fB\fB0\fR\fR
316 .RS 6n
317 No errors occurred and the locales were successfully created.
321 .ne 2
323 \fB\fB1\fR\fR
325 .RS 6n
326 Warnings occurred and the locales were successfully created.
330 .ne 2
332 \fB\fB2\fR\fR
334 .RS 6n
335 The locale specification exceeded implementation limits or the coded character
336 set or sets used were not supported by the implementation, and no locale was
337 created.
341 .ne 2
343 \fB\fB3\fR\fR
345 .RS 6n
346 The capability to create new locales is not supported by the implementation.
350 .ne 2
352 \fB\fB>3\fR\fR
354 .RS 6n
355 Warnings or errors occurred and no output was created.
360 If an error is detected, no permanent output will be created.
361 .SH FILES
363 .ne 2
365 \fB\fB/usr/lib/localedef/extensions/generic_eucbc.x\fR\fR
367 .sp .6
368 .RS 4n
369 Describes what a generic \fBEUC\fR locale uses in the system. This file is used
370 by default.
374 .ne 2
376 \fB\fB/usr/lib/localedef/extensions/single_byte.x\fR\fR
378 .sp .6
379 .RS 4n
380 Describes a generic single-byte file used in the system.
384 .ne 2
386 \fB\fB/usr/lib/locale/\fIlocalename\fR/\fIlocalename\fR.so.\fIversion_number\fR
387 \fR\fR
389 .sp .6
390 .RS 4n
391 The shared object for the 32-bit environment.
395 .ne 2
397 \fB\fB/usr/lib/locale/\fIlocalename\fR/sparcv9/\fIlocalename\fR.so.\fIversion_n
398 umber\fR\fR\fR
400 .sp .6
401 .RS 4n
402 The shared object for the 64-bit environment on SPARC.
406 .ne 2
408 \fB\fB/usr/lib/locale/\fI<localename>\fR/amd64/\fI<localename>\fR\&.so.\fI<vers
409 ion_number>\fR\fR\fR
411 .sp .6
412 .RS 4n
413 The shared object for the 64-bit environment on AMD64.
416 .SH ATTRIBUTES
419 See \fBattributes\fR(5) for descriptions of the following attributes:
424 box;
425 c | c
426 l | l .
427 ATTRIBUTE TYPE  ATTRIBUTE VALUE
429 Interface Stability     Standard
432 .SH SEE ALSO
435 \fBlocale\fR(1), \fBiconv_open\fR(3C), \fBnl_langinfo\fR(3C),
436 \fBstrftime\fR(3C), \fBattributes\fR(5), \fBcharmap\fR(5), \fBenviron\fR(5),
437 \fBextensions\fR(5), \fBlocale\fR(5), \fBstandards\fR(5)
438 .SH WARNINGS
441 If warnings occur, permanent output will be created if the \fB-c\fR option was
442 specified. The following conditions will cause warning messages to be issued:
443 .RS +4
445 .ie t \(bu
446 .el o
447 If a symbolic name not found in the \fIcharmap\fR file is used for the
448 descriptions of the \fBLC_CTYPE\fR or \fBLC_COLLATE\fR categories (for other
449 categories, this will be an error conditions).
451 .RS +4
453 .ie t \(bu
454 .el o
455 If optional keywords not supported by the implementation are present in the
456 source.
458 .SH NOTES
461 When the \fB-u\fR option is used, the \fIcode_set_name\fR option-argument is
462 interpreted as a name of a codeset to which the ISO/IEC 10646-1: 2000 standard
463 position constant values are converted. Both the ISO/IEC 10646-1: 2000 standard
464 position constant values and other formats (decimal, hexadecimal, or octal) are
465 valid as encoding values within the charmap file. The codeset can be any
466 codeset that is supported by the \fBiconv_open\fR(3C) function on the system.
469 When conflicts occur between the charmap specification of \fIcode_set_name\fR,
470 \fImb_cur_max\fR, or \fImb_cur_min\fR and the corresponding value for the
471 codeset represented by the \fB-u\fR option-argument \fIcode_set_name\fR, the
472 \fBlocaledef\fR utility fails as an error.
475 When conflicts occur between the charmap encoding values specified for symbolic
476 names of characters of the portable character set and the character encoding
477 values defined by the US-ASCII, the result is unspecified.
480 If a non-printable character in the charmap has a width specified that is not
481 \fB-1\fR, \fBlocaledef\fR generates a warning.