2 .\" Copyright (c) 1992, X/Open Company Limited All Rights Reserved
3 .\" Portions Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
4 .\" Portions Copyright 2013 DEY Storage Systems, Inc.
5 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
6 .\" permission to reproduce portions of its copyrighted documentation.
7 .\" Original documentation from The Open Group can be obtained online at
8 .\" http://www.opengroup.org/bookstore/.
9 .\" The Institute of Electrical and Electronics Engineers and The Open Group,
10 .\" have given us permission to reprint portions of their documentation. In
11 .\" the following statement, the phrase "this text" refers to portions of the
12 .\" system documentation. Portions of this text are reprinted and reproduced
13 .\" in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1,
14 .\" 2004 Edition, Standard for Information Technology -- Portable Operating
15 .\" System Interface (POSIX), The Open Group Base Specifications Issue 6,
16 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
17 .\" Engineers, Inc and The Open Group. In the event of any discrepancy between
18 .\" these versions and the original IEEE and The Open Group Standard, the
19 .\" original IEEE and The Open Group Standard is the referee document. The
20 .\" original Standard can be obtained online at
21 .\" http://www.opengroup.org/unix/online.html.
22 .\" This notice shall appear on any product containing this material.
23 .\" The contents of this file are subject to the terms of the Common
24 .\" Development and Distribution License (the "License"). You may not use
25 .\" this file except in compliance with the License.
26 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or
27 .\" http://www.opensolaris.org/os/licensing. See the License for the specific
28 .\" language governing permissions and limitations under the License.
29 .\" When distributing Covered Code, include this CDDL HEADER in each file and
30 .\" include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable,
31 .\" add the following below this CDDL HEADER, with the fields enclosed by
32 .\" brackets "[]" replaced with your own identifying information:
33 .\" Portions Copyright [yyyy] [name of copyright owner]
34 .TH LOCALEDEF 1 "April 9, 2016"
36 localedef \- define locale environment
40 \fBlocaledef\fR [\fB-c\fR] [\fB-v\fR] [\fB-U\fR\] [\fB-f\fR \fIcharmap\fR]
41 [\fB-w\fR \fIwidthfile\fR] [\fB-i\fR \fIsourcefile\fR]
42 [\fB-u\fR \fIcode_set_name\fR] \fIlocalename\fR
47 The \fBlocaledef\fR utility converts source definitions for locale categories
48 into a format usable by the functions and utilities whose operational behavior
49 is determined by the setting of the locale environment variables; see
53 The utility reads source definitions for one or more locale categories
54 belonging to the same locale from the file named in the \fB-i\fR option (if
55 specified) or from standard input.
58 Each category source definition is identified by the corresponding environment
59 variable name and terminated by an \fBEND\fR \fIcategory-name\fR statement. The
60 following categories are supported.
67 Defines character classification and case conversion.
73 \fB\fBLC_COLLATE\fR\fR
76 Defines collation rules.
82 \fB\fBLC_MONETARY\fR\fR
85 Defines the format and symbols used in formatting of monetary information.
91 \fB\fBLC_NUMERIC\fR\fR
94 Defines the decimal delimiter, grouping and grouping symbol for non-monetary
104 Defines the format and content of date and time information.
110 \fB\fBLC_MESSAGES\fR\fR
113 Defines the format and values of affirmative and negative responses.
118 The following options are supported:
125 Creates permanent output even if warning messages have been issued.
134 Emit verbose debugging output on standard output.
143 Ignore the presence of character symbols that have no matching character
144 definition. This facilitates the use of a common locale definition file
145 to be used across multiple encodings, even when some symbols are not
146 present in a given encoding.
148 Support for this option is an illumos extension.
154 \fB\fB-f\fR \fIcharmap\fR\fR
157 Specifies the pathname of a file containing a mapping of character symbols and
158 collating element symbols to actual character encodings. This option must be
159 specified if symbolic names (other than collating symbols defined in a
160 \fBcollating-symbol\fR keyword) are used. If the \fB-f\fR option is not
161 present, the default character mapping will be used.
167 \fB\fB-w\fR \fIwidthfile\fR\fR
170 The path name of the file containing character screen width definitions.
171 If not supplied, then default screen widths will be assumed, which will
172 generally not account for East Asian encodings requiring more than a single
173 character cell to display, nor for combining or accent marks that occupy
174 no additional screen width.
176 The support for width files is an illumos extension.
182 \fB\fB-i\fR \fIsourcefile\fR\fR
185 The path name of a file containing the source definitions. If this option is
186 not present, source definitions will be read from standard input.
192 \fB\fB-u\fR \fIcode_set_name\fR\fR
195 Specifies the name of a codeset used as the target mapping of character symbols
196 and collating element symbols whose encoding values are defined in terms of the
197 ISO/IEC 10646-1: 2000 standard position constant values. See NOTES.
202 The following operand is supported:
206 \fB\fIlocalename\fR\fR
209 Identifies the locale. If the name contains one or more slash characters,
210 \fIlocalename\fR will be interpreted as a path name where the created locale
211 definitions will be stored. This capability may be restricted to users with
212 appropriate privileges. (As a consequence of specifying one \fIlocalename\fR,
213 although several categories can be processed in one execution, only categories
214 belonging to the same locale can be processed.)
219 \fBlocaledef\fR creates a directory of files that represents the locale's
220 data. The contants of this directory should generally be copied into the
221 appropriate subdirectory of /usr/lib/locale in order the definitions to
222 be visible to programs linked with libc.
224 .SH ENVIRONMENT VARIABLES
226 See \fBenviron\fR(5) for definitions of the following environment variables
227 that affect the execution of \fBlocaledef\fR: \fBLANG\fR, \fBLC_ALL\fR,
228 \fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
231 The following exit values are returned:
238 No errors occurred and the locales were successfully created.
247 Warnings occurred and the locales were successfully created.
256 The locale specification exceeded implementation limits or the coded character
257 set or sets used were not supported by the implementation, and no locale was
267 Warnings or errors occurred and no output was created.
272 If an error is detected, no permanent output will be created.
276 \fB/usr/lib/locale/\fR\fIlocalename\fR\fB/\fR
280 The directory containing locale data.
285 See \fBattributes\fR(5) for descriptions of the following attributes:
293 ATTRIBUTE TYPE ATTRIBUTE VALUE
295 Interface Stability Standard
300 \fBlocale\fR(1), \fBiconv_open\fR(3C), \fBnl_langinfo\fR(3C),
301 \fBstrftime\fR(3C), \fBattributes\fR(5), \fBcharmap\fR(5), \fBenviron\fR(5),
302 \fBextensions\fR(5), \fBlocale\fR(5), \fBstandards\fR(5)
305 If warnings occur, permanent output will be created if the \fB-c\fR option was
306 specified. The following conditions will cause warning messages to be issued:
311 If a symbolic name not found in the \fIcharmap\fR file is used for the
312 descriptions of the \fBLC_CTYPE\fR or \fBLC_COLLATE\fR categories (for other
313 categories, this will be an error condition).
319 If optional keywords not supported by the implementation are present in the
324 When the \fB-u\fR option is used, the \fIcode_set_name\fR option-argument is
325 interpreted as a name of a codeset to which the ISO/IEC 10646-1: 2000 standard
326 position constant values are converted. Both the ISO/IEC 10646-1: 2000 standard
327 position constant values and other formats (decimal, hexadecimal, or octal) are
328 valid as encoding values within the charmap file. The codeset can be any
329 codeset that is supported by the \fBiconv_open\fR(3C) function on the system.
332 When conflicts occur between the charmap specification of \fIcode_set_name\fR,
333 \fImb_cur_max\fR, or \fImb_cur_min\fR and the corresponding value for the
334 codeset represented by the \fB-u\fR option-argument \fIcode_set_name\fR, the
335 \fBlocaledef\fR utility fails as an error.
338 When conflicts occur between the charmap encoding values specified for symbolic
339 names of characters of the portable character set and the character encoding
340 values defined by the US-ASCII, the result is unspecified.