9070 Remove wanboot from gate
[unleashed.git] / usr / src / man / man1 / localedef.1
blob3c32f9f3cb65e5d09dc10138d142d678f071002a
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 .\" 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"
35 .SH NAME
36 localedef \- define locale environment
37 .SH SYNOPSIS
38 .LP
39 .nf
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
43 .fi
45 .SH DESCRIPTION
46 .LP
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
50 \fBenviron\fR(5).
51 .sp
52 .LP
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.
56 .sp
57 .LP
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.
61 .sp
62 .ne 2
63 .na
64 \fB\fBLC_CTYPE\fR\fR
65 .ad
66 .RS 15n
67 Defines character classification and case conversion.
68 .RE
70 .sp
71 .ne 2
72 .na
73 \fB\fBLC_COLLATE\fR\fR
74 .ad
75 .RS 15n
76 Defines collation rules.
77 .RE
79 .sp
80 .ne 2
81 .na
82 \fB\fBLC_MONETARY\fR\fR
83 .ad
84 .RS 15n
85 Defines the format and symbols used in formatting of monetary information.
86 .RE
88 .sp
89 .ne 2
90 .na
91 \fB\fBLC_NUMERIC\fR\fR
92 .ad
93 .RS 15n
94 Defines the decimal delimiter, grouping and grouping symbol for non-monetary
95 numeric editing.
96 .RE
98 .sp
99 .ne 2
101 \fB\fBLC_TIME\fR\fR
103 .RS 15n
104 Defines the format and content of date and time information.
108 .ne 2
110 \fB\fBLC_MESSAGES\fR\fR
112 .RS 15n
113 Defines the format and values of affirmative and negative responses.
116 .SH OPTIONS
118 The following options are supported:
120 .ne 2
122 \fB\fB-c\fR\fR
124 .RS 23n
125 Creates permanent output even if warning messages have been issued.
129 .ne 2
131 \fB\fB-v\fR\fR
133 .RS 23n
134 Emit verbose debugging output on standard output.
138 .ne 2
140 \fB\fB-U\fR\fR
142 .RS 23n
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.
152 .ne 2
154 \fB\fB-f\fR \fIcharmap\fR\fR
156 .RS 23n
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.
165 .ne 2
167 \fB\fB-w\fR \fIwidthfile\fR\fR
169 .RS 23n
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.
180 .ne 2
182 \fB\fB-i\fR \fIsourcefile\fR\fR
184 .RS 23n
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.
190 .ne 2
192 \fB\fB-u\fR \fIcode_set_name\fR\fR
194 .RS 23n
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.
200 .SH OPERANDS
202 The following operand is supported:
204 .ne 2
206 \fB\fIlocalename\fR\fR
208 .RS 14n
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.)
217 .SH OUTPUT
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.
229 .SH EXIT STATUS
231 The following exit values are returned:
233 .ne 2
235 \fB\fB0\fR\fR
237 .RS 6n
238 No errors occurred and the locales were successfully created.
242 .ne 2
244 \fB\fB1\fR\fR
246 .RS 6n
247 Warnings occurred and the locales were successfully created.
251 .ne 2
253 \fB\fB2\fR\fR
255 .RS 6n
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
258 created.
262 .ne 2
264 \fB\fB>3\fR\fR
266 .RS 6n
267 Warnings or errors occurred and no output was created.
272 If an error is detected, no permanent output will be created.
273 .SH FILES
274 .ne 2
276 \fB/usr/lib/locale/\fR\fIlocalename\fR\fB/\fR
278 .sp .6
279 .RS 4n
280 The directory containing locale data.
283 .SH ATTRIBUTES
285 See \fBattributes\fR(5) for descriptions of the following attributes:
290 box;
291 c | c
292 l | l .
293 ATTRIBUTE TYPE  ATTRIBUTE VALUE
295 Interface Stability     Standard
298 .SH SEE ALSO
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)
303 .SH WARNINGS
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:
307 .RS +4
309 .ie t \(bu
310 .el o
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).
315 .RS +4
317 .ie t \(bu
318 .el o
319 If optional keywords not supported by the implementation are present in the
320 source.
322 .SH NOTES
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.