1localedef(1) User Commands localedef(1)
2
3
4
6 localedef - define locale environment
7
9 localedef [-c] [-C compiler_options] [-f charmap]
10 [-i sourcefile] [-L linker_options] [-m model]
11 [-u code_set_name] [-W cc, arg] [-x extensions_file] localename
12
13
15 The localedef utility converts source definitions for locale categories
16 into a format usable by the functions and utilities whose operational
17 behavior is determined by the setting of the locale environment vari‐
18 ables; see environ(5).
19
20
21 The utility reads source definitions for one or more locale categories
22 belonging to the same locale from the file named in the -i option (if
23 specified) or from standard input.
24
25
26 Each category source definition is identified by the corresponding
27 environment variable name and terminated by an END category-name state‐
28 ment. The following categories are supported.
29
30 LC_CTYPE Defines character classification and case conversion.
31
32
33 LC_COLLATE Defines collation rules.
34
35
36 LC_MONETARY Defines the format and symbols used in formatting of
37 monetary information.
38
39
40 LC_NUMERIC Defines the decimal delimiter, grouping and grouping
41 symbol for non-monetary numeric editing.
42
43
44 LC_TIME Defines the format and content of date and time informa‐
45 tion.
46
47
48 LC_MESSAGES Defines the format and values of affirmative and nega‐
49 tive responses.
50
51
53 The following options are supported:
54
55 -c Creates permanent output even if warning mes‐
56 sages have been issued.
57
58
59 -C compiler_options Passes the compiler_options to the C compiler
60 (cc). If more than one option is specified, then
61 the options must be enclosed in quotes ("").
62
63 This is an old option. Use the -W cc,arg option
64 instead.
65
66
67 -f charmap Specifies the pathname of a file containing a
68 mapping of character symbols and collating ele‐
69 ment symbols to actual character encodings. This
70 option must be specified if symbolic names
71 (other than collating symbols defined in a col‐
72 lating-symbol keyword) are used. If the -f
73 option is not present, the default character
74 mapping will be used.
75
76
77 -i sourcefile The path name of a file containing the source
78 definitions. If this option is not present,
79 source definitions will be read from standard
80 input.
81
82
83 -L linker_options Passes the linker_options to the C compiler (cc)
84 that follows the C source filename. If more than
85 one option is specified, then the options must
86 be enclosed in quotes ("").
87
88 This is an old option. Use the -W cc,arg option
89 instead.
90
91
92 -m model Specifies whether localedef will generate a
93 64-bit or a 32-bit locale object.
94
95 Specify model as ilp32 to generate a 32-bit
96 locale object. Specify lp64 to generate a 64-bit
97 locale object. If the -m option is not speci‐
98 fied, localedef generates a 32-bit locale
99 object. And if no other options than -c, -f, and
100 -i options are specified and if the system run‐
101 ning localedef supports the 64-bit environment,
102 localedef additionally generates a 64-bit locale
103 object.
104
105
106 -u code_set_name Specifies the name of a codeset used as the tar‐
107 get mapping of character symbols and collating
108 element symbols whose encoding values are
109 defined in terms of the ISO/IEC 10646-1: 2000
110 standard position constant values. See NOTES.
111
112
113 -W cc,arg Passes arg options to the C compiler. Each argu‐
114 ment must be separated from the preceding by
115 only a comma. A comma can be part of an argument
116 by escaping it withan immediately preceding
117 backslash character; the backslash is removed
118 from the resulting argument.
119
120 Use this option instead of the -C and -L
121 options.
122
123
124 -x extensions_file Specifies the name of an extension file where
125 various localedef options are listed. See
126 locale(5).
127
128
130 The following operand is supported:
131
132 localename Identifies the locale. If the name contains one or more
133 slash characters, localename will be interpreted as a
134 path name where the created locale definitions will be
135 stored. This capability may be restricted to users with
136 appropriate privileges. (As a consequence of specifying
137 one localename, although several categories can be pro‐
138 cessed in one execution, only categories belonging to the
139 same locale can be processed.)
140
141
143 localedef creates a temporary C source file that represents the
144 locale's data. localedef then calls the C compiler to compile this C
145 source file into a shared object.
146
147
148 If the -m ilp32 option is specified, localedef calls the C compiler for
149 generating 32-bit objects and generates a 32-bit locale object. If the
150 -m lp64 option is specified, localedef calls the C compiler for gener‐
151 ating 64-bit objects and generates a 64-bit locale object.
152
153
154 If the -m option is not specified, localedef calls the C compiler for
155 generating 32-bit objects and generates a 32-bit locale object. If no
156 other options than -c, -f, and -i options are specified and if the sys‐
157 tem running localedef supports the 64-bit environment, localedef addi‐
158 tionally calls the C compiler for generating 64-bit objects and gener‐
159 ates a 64-bit locale object.
160
161
162 If no option to the C compiler is explicitly specified using the -W,
163 -C, or -L options, localedef calls the C compiler with appropriate C
164 compiler options to generate a locale object or objects.
165
166
167 If the -m ilp32 option is specified, localedef generates a 32-bit
168 locale object named:
169
170
171 localename.so.version_number
172
173
174 If the -m lp64 option is specified, localedef generates a 64-bit locale
175 object named:
176
177
178 localename.so.version_number
179
180
181 If the -m option is not specified, localedef generates a 32-bit locale
182 object named:
183
184
185 localename.so.version_number
186
187
188 and, if appropriate, generates a 64-bit locale object named:
189
190
191 64-bit_architecture_name/localename.so.version_number
192
193
194 The shared object for the 32-bit environment must be moved to:
195
196
197 /usr/lib/locale/localename/localename.so.version_number
198
199
200 The shared object for the 64-bit environment on SPARC must be moved to:
201
202
203 /usr/lib/locale/localename/sparcv9/localename.so.version_number
204
205
206 The shared object for the 64-bit environment on AMD64 must be moved to:
207
208
209 /usr/lib/locale/<localename>/amd64/<localename>.so.<version_number>
210
211
212 localedef also generates a text file named localename that is used for
213 information only.
214
216 See environ(5) for definitions of the following environment variables
217 that affect the execution of localedef: LANG, LC_ALL, LC_COLLATE,
218 LC_CTYPE, LC_MESSAGES, and NLSPATH.
219
221 The following exit values are returned:
222
223 0 No errors occurred and the locales were successfully created.
224
225
226 1 Warnings occurred and the locales were successfully created.
227
228
229 2 The locale specification exceeded implementation limits or the
230 coded character set or sets used were not supported by the imple‐
231 mentation, and no locale was created.
232
233
234 3 The capability to create new locales is not supported by the
235 implementation.
236
237
238 >3 Warnings or errors occurred and no output was created.
239
240
241
242 If an error is detected, no permanent output will be created.
243
245 /usr/lib/localedef/extensions/generic_eucbc.x
246
247 Describes what a generic EUC locale uses in the system. This file
248 is used by default.
249
250
251 /usr/lib/localedef/extensions/single_byte.x
252
253 Describes a generic single-byte file used in the system.
254
255
256 /usr/lib/locale/localename/localename.so.version_number
257
258 The shared object for the 32-bit environment.
259
260
261 /usr/lib/locale/localename/sparcv9/localename.so.version_number
262
263 The shared object for the 64-bit environment on SPARC.
264
265
266 /usr/lib/locale/<localename>/amd64/<localename>.so.<version_number>
267
268 The shared object for the 64-bit environment on AMD64.
269
270
272 See attributes(5) for descriptions of the following attributes:
273
274
275
276
277 ┌─────────────────────────────┬─────────────────────────────┐
278 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
279 ├─────────────────────────────┼─────────────────────────────┤
280 │Availability │SUNWcsu │
281 ├─────────────────────────────┼─────────────────────────────┤
282 │Interface Stability │Standard │
283 └─────────────────────────────┴─────────────────────────────┘
284
286 locale(1), iconv_open(3C), nl_langinfo(3C), strftime(3C),
287 attributes(5), charmap(5), environ(5), extensions(5), locale(5), stan‐
288 dards(5)
289
291 If warnings occur, permanent output will be created if the -c option
292 was specified. The following conditions will cause warning messages to
293 be issued:
294
295 o If a symbolic name not found in the charmap file is used for
296 the descriptions of the LC_CTYPE or LC_COLLATE categories
297 (for other categories, this will be an error conditions).
298
299 o If optional keywords not supported by the implementation are
300 present in the source.
301
303 When the -u option is used, the code_set_name option-argument is inter‐
304 preted as a name of a codeset to which the ISO/IEC 10646-1: 2000 stan‐
305 dard position constant values are converted. Both the ISO/IEC 10646-1:
306 2000 standard position constant values and other formats (decimal,
307 hexadecimal, or octal) are valid as encoding values within the charmap
308 file. The codeset can be any codeset that is supported by the
309 iconv_open(3C) function on the system.
310
311
312 When conflicts occur between the charmap specification of
313 code_set_name, mb_cur_max, or mb_cur_min and the corresponding value
314 for the codeset represented by the -u option-argument code_set_name,
315 the localedef utility fails as an error.
316
317
318 When conflicts occur between the charmap encoding values specified for
319 symbolic names of characters of the portable character set and the
320 character encoding values defined by the US-ASCII, the result is
321 unspecified.
322
323
324 If a non-printable character in the charmap has a width specified that
325 is not -1, localedef generates a warning.
326
327
328
329SunOS 5.11 11 Oct 2004 localedef(1)