1LOCALEDEF(1P)              POSIX Programmer's Manual             LOCALEDEF(1P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       localedef - define locale environment
13

SYNOPSIS

15       localedef [-c][-f charmap][-i sourcefile][-u code_set_name] name
16

DESCRIPTION

18       The localedef utility shall convert source definitions for locale cate‐
19       gories into a format usable by the functions and utilities whose opera‐
20       tional behavior is determined by the setting of the locale  environment
21       variables    defined    in    the    Base    Definitions    volume   of
22       IEEE Std 1003.1-2001, Chapter 7, Locale. It  is  implementation-defined
23       whether users have the capability to create new locales, in addition to
24       those  supplied  by  the  implementation.  If  the  symbolic   constant
25       POSIX2_LOCALEDEF  is  defined,  the system supports the creation of new
26       locales.    On   XSI-conformant   systems,   the   symbolic    constant
27       POSIX2_LOCALEDEF shall be defined.
28
29       The  utility shall read source definitions for one or more locale cate‐
30       gories belonging to the same locale from  the  file  named  in  the  -i
31       option (if specified) or from standard input.
32
33       The  name  operand identifies the target locale. The utility shall sup‐
34       port the creation of public, or generally accessible locales,  as  well
35       as  private, or restricted-access locales. Implementations may restrict
36       the capability to create or modify public locales  to  users  with  the
37       appropriate privileges.
38
39       Each  category source definition shall be identified by the correspond‐
40       ing environment variable name and terminated by  an  END  category-name
41       statement.  The  following  categories shall be supported. In addition,
42       the input may contain source for implementation-defined categories.
43
44       LC_CTYPE
45              Defines character classification and case conversion.
46
47       LC_COLLATE
48
49              Defines collation rules.
50
51       LC_MONETARY
52
53              Defines the format and symbols used in  formatting  of  monetary
54              information.
55
56       LC_NUMERIC
57
58              Defines the decimal delimiter, grouping, and grouping symbol for
59              non-monetary numeric editing.
60
61       LC_TIME
62              Defines the format and content of date and time information.
63
64       LC_MESSAGES
65
66              Defines the  format  and  values  of  affirmative  and  negative
67              responses.
68
69

OPTIONS

71       The  localedef  utility shall conform to the Base Definitions volume of
72       IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
73
74       The following options shall be supported:
75
76       -c     Create permanent output  even  if  warning  messages  have  been
77              issued.
78
79       -f  charmap
80              Specify the pathname of a file containing a mapping of character
81              symbols and collating element symbols to actual character encod‐
82              ings. The format of the charmap is described in the Base Defini‐
83              tions volume of IEEE Std 1003.1-2001, Section 6.4, Character Set
84              Description  File. The application shall ensure that this option
85              is specified if symbolic names  (other  than  collating  symbols
86              defined  in  a  collating-symbol  keyword)  are  used. If the -f
87              option is not present, an implementation-defined character  map‐
88              ping shall be used.
89
90       -i  inputfile
91              The  pathname  of  a  file containing the source definitions. If
92              this option is not present, source  definitions  shall  be  read
93              from standard input. The format of the inputfile is described in
94              the Base Definitions  volume  of  IEEE Std 1003.1-2001,  Section
95              7.3, Locale Definition.
96
97       -u  code_set_name
98
99              Specify  the  name  of  a  codeset used as the target mapping of
100              character symbols and collating element symbols  whose  encoding
101              values are defined in terms of the ISO/IEC 10646-1:2000 standard
102              position constant values.
103
104

OPERANDS

106       The following operand shall be supported:
107
108       name   Identifies the  locale;  see  the  Base  Definitions  volume  of
109              IEEE Std 1003.1-2001, Chapter 7, Locale for a description of the
110              use of this name. If the name contains one or more slash charac‐
111              ters,  name shall be interpreted as a pathname where the created
112              locale definitions shall be stored. If name does not contain any
113              slash  characters, the interpretation of the name is implementa‐
114              tion-defined and the locale shall be public. This capability may
115              be restricted to users with appropriate privileges. (As a conse‐
116              quence of specifying one name, although several  categories  can
117              be  processed in one execution, only categories belonging to the
118              same locale can be processed.)
119
120

STDIN

122       Unless the -i option is specified, the standard input shall be  a  text
123       file  containing  one  or  more  locale category source definitions, as
124       described in the Base Definitions volume of IEEE Std 1003.1-2001,  Sec‐
125       tion  7.3, Locale Definition. When lines are continued using the escape
126       character mechanism, there is no limit to the length of the accumulated
127       continued line.
128

INPUT FILES

130       The character set mapping file specified as the charmap option-argument
131       is described in the Base Definitions  volume  of  IEEE Std 1003.1-2001,
132       Section  6.4,  Character  Set  Description  File.  If a locale category
133       source definition contains a copy statement, as  defined  in  the  Base
134       Definitions  volume of IEEE Std 1003.1-2001, Chapter 7, Locale, and the
135       copy statement names a valid, existing  locale,  then  localedef  shall
136       behave  as  if  the  source  definition  had contained a valid category
137       source definition for the named locale.
138

ENVIRONMENT VARIABLES

140       The following environment  variables  shall  affect  the  execution  of
141       localedef:
142
143       LANG   Provide  a  default value for the internationalization variables
144              that are unset or null. (See  the  Base  Definitions  volume  of
145              IEEE Std 1003.1-2001,  Section  8.2,  Internationalization Vari‐
146              ables for the precedence of internationalization variables  used
147              to determine the values of locale categories.)
148
149       LC_ALL If  set  to a non-empty string value, override the values of all
150              the other internationalization variables.
151
152       LC_COLLATE
153
154              (This variable has no affect on localedef; the POSIX  locale  is
155              used for this category.)
156
157       LC_CTYPE
158              Determine  the  locale  for  the  interpretation of sequences of
159              bytes of text data as characters (for  example,  single-byte  as
160              opposed  to multi-byte characters in arguments and input files).
161              This variable has no affect on the processing of localedef input
162              data;  the  POSIX locale is used for this purpose, regardless of
163              the value of this variable.
164
165       LC_MESSAGES
166              Determine the locale that should be used to  affect  the  format
167              and contents of diagnostic messages written to standard error.
168
169       NLSPATH
170              Determine the location of message catalogs for the processing of
171              LC_MESSAGES .
172
173

ASYNCHRONOUS EVENTS

175       Default.
176

STDOUT

178       The utility shall report all categories successfully processed,  in  an
179       unspecified format.
180

STDERR

182       The standard error shall be used only for diagnostic messages.
183

OUTPUT FILES

185       The  format  of  the created output is unspecified. If the name operand
186       does not contain a slash, the existence  of  an  output  file  for  the
187       locale is unspecified.
188

EXTENDED DESCRIPTION

190       When  the -u option is used, the code_set_name option-argument shall be
191       interpreted as an implementation-defined name of a codeset to which the
192       ISO/IEC 10646-1:2000  standard  position  constant values shall be con‐
193       verted    via    an    implementation-defined    method.    Both    the
194       ISO/IEC 10646-1:2000  standard  position constant values and other for‐
195       mats (decimal, hexadecimal, or octal) shall be valid as encoding values
196       within the charmap file. The codeset represented by the implementation-
197       defined name can be any codeset that is supported  by  the  implementa‐
198       tion.
199
200       When   conflicts   occur   between   the   charmap   specification   of
201       <code_set_name>, <mb_cur_max>, or <mb_cur_min> and the  implementation-
202       defined interpretation of these respective items for the codeset repre‐
203       sented by the -u option-argument code_set_name, the result is  unspeci‐
204       fied.
205
206       When  conflicts occur between the charmap encoding values specified for
207       symbolic names of characters of the  portable  character  set  and  the
208       implementation-defined  assignment  of  character  encoding values, the
209       result is unspecified.
210
211       If a non-printable character in the charmap has a width specified  that
212       is not -1, localedef shall generate a warning.
213

EXIT STATUS

215       The following exit values shall be returned:
216
217        0     No errors occurred and the locales were successfully created.
218
219        1     Warnings occurred and the locales were successfully created.
220
221        2     The  locale  specification exceeded implementation limits or the
222              coded character set or sets  used  were  not  supported  by  the
223              implementation, and no locale was created.
224
225        3     The  capability  to  create  new locales is not supported by the
226              implementation.
227
228       >3     Warnings or errors occurred and no output was created.
229
230

CONSEQUENCES OF ERRORS

232       If an error is detected, no permanent output shall be created.
233
234       If warnings occur, permanent output shall be created if the  -c  option
235       was specified. The following conditions shall cause warning messages to
236       be issued:
237
238        * If a symbolic name not found in the charmap file  is  used  for  the
239          descriptions  of  the  LC_CTYPE  or LC_COLLATE categories (for other
240          categories, this shall be an error condition).
241
242        * If  the  number  of  operands  to  the  order  keyword  exceeds  the
243          {COLL_WEIGHTS_MAX} limit.
244
245        * If optional keywords not supported by the implementation are present
246          in the source.
247
248        * If a non-printable character has a width specified other than -1.
249
250       Other implementation-defined conditions may also cause warnings.
251
252       The following sections are informative.
253

APPLICATION USAGE

255       The charmap definition is optional, and is contained outside the locale
256       definition.  This allows both completely self-defined source files, and
257       generic sources (applicable to more than one codeset). To aid portabil‐
258       ity,  all  charmap definitions must use the same symbolic names for the
259       portable character set. As explained in the Base Definitions volume  of
260       IEEE Std 1003.1-2001,  Section  6.4, Character Set Description File, it
261       is implementation-defined whether or not users or applications can pro‐
262       vide  additional  character  set  description  files. Therefore, the -f
263       option might be operable only when an implementation-defined charmap is
264       named.
265

EXAMPLES

267       None.
268

RATIONALE

270       The output produced by the localedef utility is implementation-defined.
271       The name operand is used to identify the specific locale. (As a  conse‐
272       quence,  although several categories can be processed in one execution,
273       only categories belonging to the same locale can be processed.)
274

FUTURE DIRECTIONS

276       None.
277

SEE ALSO

279       locale, the Base Definitions volume  of  IEEE Std 1003.1-2001,  Section
280       7.3, Locale Definition
281
283       Portions  of  this text are reprinted and reproduced in electronic form
284       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
285       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
286       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
287       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
288       event of any discrepancy between this version and the original IEEE and
289       The  Open Group Standard, the original IEEE and The Open Group Standard
290       is the referee document. The original Standard can be  obtained  online
291       at http://www.opengroup.org/unix/online.html .
292
293
294
295IEEE/The Open Group                  2003                        LOCALEDEF(1P)
Impressum