summaryrefslogtreecommitdiff
path: root/usr/src/man/man1/localedef.1
blob: ae02600ef3651063e49e391825963ac11bbf77d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
.\"
.\" 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
.\" http://www.opengroup.org/bookstore/.
.\"
.\" 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 SunOS 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.
.\"
.\" This notice shall appear on any product containing this material.
.\"
.\" 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.
.\"
.\" 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.
.\"
.\" 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]
.\"
.\"
.\" Copyright (c) 1992, X/Open Company Limited  All Rights Reserved
.\" Portions Copyright (c) 2003, Sun Microsystems, Inc.  All Rights Reserved
.\" Portions Copyright 2013 DEY Storage Systems, Inc.
.\"
.TH LOCALEDEF 1 "April 9, 2016"
.SH NAME
localedef \- define locale environment
.SH SYNOPSIS
.nf
\fBlocaledef\fR [\fB-c\fR] [\fB-v\fR] [\fB-U\fR] [\fB-f\fR \fIcharmap\fR]
     [\fB-w\fR \fIwidthfile\fR] [\fB-i\fR \fIsourcefile\fR]
     [\fB-u\fR \fIcode_set_name\fR] \fIlocalename\fR
.fi

.SH DESCRIPTION
The \fBlocaledef\fR utility converts source definitions for locale categories
into a format usable by the functions and utilities whose operational behavior
is determined by the setting of the locale environment variables; see
\fBenviron\fR(7).
.sp
.LP
The utility reads source definitions for one or more locale categories
belonging to the same locale from the file named in the \fB-i\fR option (if
specified) or from standard input.
.sp
.LP
Each category source definition is identified by the corresponding environment
variable name and terminated by an \fBEND\fR \fIcategory-name\fR statement. The
following categories are supported.
.sp
.ne 2
.na
\fB\fBLC_CTYPE\fR\fR
.ad
.RS 15n
Defines character classification and case conversion.
.RE

.sp
.ne 2
.na
\fB\fBLC_COLLATE\fR\fR
.ad
.RS 15n
Defines collation rules.
.RE

.sp
.ne 2
.na
\fB\fBLC_MONETARY\fR\fR
.ad
.RS 15n
Defines the format and symbols used in formatting of monetary information.
.RE

.sp
.ne 2
.na
\fB\fBLC_NUMERIC\fR\fR
.ad
.RS 15n
Defines the decimal delimiter, grouping and grouping symbol for non-monetary
numeric editing.
.RE

.sp
.ne 2
.na
\fB\fBLC_TIME\fR\fR
.ad
.RS 15n
Defines the format and content of date and time information.
.RE

.sp
.ne 2
.na
\fB\fBLC_MESSAGES\fR\fR
.ad
.RS 15n
Defines the format and values of affirmative and negative responses.
.RE

.SH OPTIONS
The following options are supported:
.sp
.ne 2
.na
\fB\fB-c\fR\fR
.ad
.RS 23n
Creates permanent output even if warning messages have been issued.
.RE

.sp
.ne 2
.na
\fB\fB-v\fR\fR
.ad
.RS 23n
Emit verbose debugging output on standard output.
.RE

.sp
.ne 2
.na
\fB\fB-U\fR\fR
.ad
.RS 23n
Ignore the presence of character symbols that have no matching character
definition.  This facilitates the use of a common locale definition file
to be used across multiple encodings, even when some symbols are not
present in a given encoding.
.sp
Support for this option is an illumos extension.
.RE

.sp
.ne 2
.na
\fB\fB-f\fR \fIcharmap\fR\fR
.ad
.RS 23n
Specifies the pathname of a file containing a mapping of character symbols and
collating element symbols to actual character encodings. This option must be
specified if symbolic names (other than collating symbols defined in a
\fBcollating-symbol\fR keyword) are used. If the \fB-f\fR option is not
present, the default character mapping will be used.
.RE

.sp
.ne 2
.na
\fB\fB-w\fR \fIwidthfile\fR\fR
.ad
.RS 23n
The path name of the file containing character screen width definitions.
If not supplied, then default screen widths will be assumed, which will
generally not account for East Asian encodings requiring more than a single
character cell to display, nor for combining or accent marks that occupy
no additional screen width.
.sp
The support for width files is an illumos extension.
.RE

.sp
.ne 2
.na
\fB\fB-i\fR \fIsourcefile\fR\fR
.ad
.RS 23n
The path name of a file containing the source definitions. If this option is
not present, source definitions will be read from standard input.
.RE

.sp
.ne 2
.na
\fB\fB-u\fR \fIcode_set_name\fR\fR
.ad
.RS 23n
Specifies the name of a codeset used as the target mapping of character symbols
and collating element symbols whose encoding values are defined in terms of the
ISO/IEC 10646-1: 2000 standard position constant values. See NOTES.
.RE

.SH OPERANDS
The following operand is supported:
.sp
.ne 2
.na
\fB\fIlocalename\fR\fR
.ad
.RS 14n
Identifies the locale. If the name contains one or more slash characters,
\fIlocalename\fR will be interpreted as a path name where the created locale
definitions will be stored. This capability may be restricted to users with
appropriate privileges. (As a consequence of specifying one \fIlocalename\fR,
although several categories can be processed in one execution, only categories
belonging to the same locale can be processed.)
.RE

.SH OUTPUT
\fBlocaledef\fR creates a directory of files that represents the locale's
data. The contents of this directory should generally be copied into the
appropriate subdirectory of /usr/lib/locale in order the definitions to
be visible to programs linked with libc.
.sp
.SH ENVIRONMENT VARIABLES
See \fBenviron\fR(7) for definitions of the following environment variables
that affect the execution of \fBlocaledef\fR: \fBLANG\fR, \fBLC_ALL\fR,
\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR, and \fBNLSPATH\fR.
.SH EXIT STATUS
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 6n
No errors occurred and the locales were successfully created.
.RE

.sp
.ne 2
.na
\fB\fB1\fR\fR
.ad
.RS 6n
Warnings occurred and the locales were successfully created.
.RE

.sp
.ne 2
.na
\fB\fB2\fR\fR
.ad
.RS 6n
The locale specification exceeded implementation limits or the coded character
set or sets used were not supported by the implementation, and no locale was
created.
.RE

.sp
.ne 2
.na
\fB\fB>3\fR\fR
.ad
.RS 6n
Warnings or errors occurred and no output was created.
.RE

.sp
.LP
If an error is detected, no permanent output will be created.
.SH FILES
.ne 2
.na
\fB/usr/lib/locale/\fR\fIlocalename\fR\fB/\fR
.ad
.sp .6
.RS 4n
The directory containing locale data.
.RE

.SH ATTRIBUTES
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Standard
.TE

.SH SEE ALSO
.BR locale (1),
.BR iconv_open (3C),
.BR nl_langinfo (3C),
.BR strftime (3C),
.BR attributes (7),
.BR charmap (7),
.BR environ (7),
.BR extensions (7),
.BR locale (7),
.BR standards (7)
.SH WARNINGS
If warnings occur, permanent output will be created if the \fB-c\fR option was
specified. The following conditions will cause warning messages to be issued:
.RS +4
.TP
.ie t \(bu
.el o
If a symbolic name not found in the \fIcharmap\fR file is used for the
descriptions of the \fBLC_CTYPE\fR or \fBLC_COLLATE\fR categories (for other
categories, this will be an error condition).
.RE
.RS +4
.TP
.ie t \(bu
.el o
If optional keywords not supported by the implementation are present in the
source.
.RE
.SH NOTES
When the \fB-u\fR option is used, the \fIcode_set_name\fR option-argument is
interpreted as a name of a codeset to which the ISO/IEC 10646-1: 2000 standard
position constant values are converted. Both the ISO/IEC 10646-1: 2000 standard
position constant values and other formats (decimal, hexadecimal, or octal) are
valid as encoding values within the charmap file. The codeset can be any
codeset that is supported by the \fBiconv_open\fR(3C) function on the system.
.sp
.LP
When conflicts occur between the charmap specification of \fIcode_set_name\fR,
\fImb_cur_max\fR, or \fImb_cur_min\fR and the corresponding value for the
codeset represented by the \fB-u\fR option-argument \fIcode_set_name\fR, the
\fBlocaledef\fR utility fails as an error.
.sp
.LP
When conflicts occur between the charmap encoding values specified for symbolic
names of characters of the portable character set and the character encoding
values defined by the US-ASCII, the result is unspecified.