Blame man-pages-posix-2013-a/man1p/localedef.1p

Packit 7cfc04
'\" et
Packit 7cfc04
.TH LOCALEDEF "1P" 2013 "IEEE/The Open Group" "POSIX Programmer's Manual"
Packit 7cfc04
.SH PROLOG
Packit 7cfc04
This manual page is part of the POSIX Programmer's Manual.
Packit 7cfc04
The Linux implementation of this interface may differ (consult
Packit 7cfc04
the corresponding Linux manual page for details of Linux behavior),
Packit 7cfc04
or the interface may not be implemented on Linux.
Packit 7cfc04
Packit 7cfc04
.SH NAME
Packit 7cfc04
localedef \(em define locale environment
Packit 7cfc04
.SH SYNOPSIS
Packit 7cfc04
.LP
Packit 7cfc04
.nf
Packit 7cfc04
localedef \fB[\fR\(mic\fB] [\fR\(mif \fIcharmap\fB] [\fR\(mii \fIsourcefile\fB] [\fR\(miu \fIcode_set_name\fB] \fIname\fR
Packit 7cfc04
.fi
Packit 7cfc04
.SH DESCRIPTION
Packit 7cfc04
The
Packit 7cfc04
.IR localedef
Packit 7cfc04
utility shall convert source definitions for locale categories into a
Packit 7cfc04
format usable by the functions and utilities whose operational behavior
Packit 7cfc04
is determined by the setting of the locale environment variables
Packit 7cfc04
defined in the Base Definitions volume of POSIX.1\(hy2008,
Packit 7cfc04
.IR "Chapter 7" ", " "Locale".
Packit 7cfc04
It is implementation-defined whether users have the capability to create
Packit 7cfc04
new locales, in addition to those supplied by the implementation. If
Packit 7cfc04
the symbolic constant POSIX2_LOCALEDEF is defined, the system supports
Packit 7cfc04
the creation of new locales.
Packit 7cfc04
On XSI-conformant systems, the symbolic constant POSIX2_LOCALEDEF
Packit 7cfc04
shall be defined.
Packit 7cfc04
.P
Packit 7cfc04
The utility shall read source definitions for one or more locale
Packit 7cfc04
categories belonging to the same locale from the file named in the
Packit 7cfc04
.BR \(mii
Packit 7cfc04
option (if specified) or from standard input.
Packit 7cfc04
.P
Packit 7cfc04
The
Packit 7cfc04
.IR name
Packit 7cfc04
operand identifies the target locale. The utility shall support the
Packit 7cfc04
creation of
Packit 7cfc04
.IR public ,
Packit 7cfc04
or generally accessible locales, as well as
Packit 7cfc04
.IR private ,
Packit 7cfc04
or restricted-access locales. Implementations may restrict the
Packit 7cfc04
capability to create or modify public locales to users with
Packit 7cfc04
appropriate privileges.
Packit 7cfc04
.P
Packit 7cfc04
Each category source definition shall be identified by the
Packit 7cfc04
corresponding environment variable name and terminated by an
Packit 7cfc04
.BR END
Packit 7cfc04
.IR category-name
Packit 7cfc04
statement. The following categories shall be supported. In addition,
Packit 7cfc04
the input may contain source for implementation-defined categories.
Packit 7cfc04
.IP "\fILC_CTYPE\fR" 10
Packit 7cfc04
Defines character classification and case conversion.
Packit 7cfc04
.IP "\fILC_COLLATE\fR" 10
Packit 7cfc04
.br
Packit 7cfc04
Defines collation rules.
Packit 7cfc04
.IP "\fILC_MONETARY\fR" 10
Packit 7cfc04
.br
Packit 7cfc04
Defines the format and symbols used in formatting of monetary
Packit 7cfc04
information.
Packit 7cfc04
.IP "\fILC_NUMERIC\fR" 10
Packit 7cfc04
.br
Packit 7cfc04
Defines the decimal delimiter, grouping, and grouping symbol for
Packit 7cfc04
non-monetary numeric editing.
Packit 7cfc04
.IP "\fILC_TIME\fR" 10
Packit 7cfc04
Defines the format and content of date and time information.
Packit 7cfc04
.IP "\fILC_MESSAGES\fR" 10
Packit 7cfc04
.br
Packit 7cfc04
Defines the format and values of affirmative and negative responses.
Packit 7cfc04
.SH OPTIONS
Packit 7cfc04
The
Packit 7cfc04
.IR localedef
Packit 7cfc04
utility shall conform to the Base Definitions volume of POSIX.1\(hy2008,
Packit 7cfc04
.IR "Section 12.2" ", " "Utility Syntax Guidelines".
Packit 7cfc04
.P
Packit 7cfc04
The following options shall be supported:
Packit 7cfc04
.IP "\fB\(mic\fP" 10
Packit 7cfc04
Create permanent output even if warning messages have been issued.
Packit 7cfc04
.IP "\fB\(mif\ \fIcharmap\fR" 10
Packit 7cfc04
Specify the pathname of a file containing a mapping of character
Packit 7cfc04
symbols and collating element symbols to actual character encodings.
Packit 7cfc04
The format of the
Packit 7cfc04
.IR charmap
Packit 7cfc04
is described in the Base Definitions volume of POSIX.1\(hy2008,
Packit 7cfc04
.IR "Section 6.4" ", " "Character Set Description File".
Packit 7cfc04
The application shall ensure that this option is specified if symbolic
Packit 7cfc04
names (other than collating symbols defined in a
Packit 7cfc04
.BR collating-symbol
Packit 7cfc04
keyword) are used. If the
Packit 7cfc04
.BR \(mif
Packit 7cfc04
option is not present, an implementation-defined character mapping
Packit 7cfc04
shall be used.
Packit 7cfc04
.IP "\fB\(mii\ \fIinputfile\fR" 10
Packit 7cfc04
The pathname of a file containing the source definitions. If this
Packit 7cfc04
option is not present, source definitions shall be read from standard
Packit 7cfc04
input. The format of the
Packit 7cfc04
.IR inputfile
Packit 7cfc04
is described in the Base Definitions volume of POSIX.1\(hy2008,
Packit 7cfc04
.IR "Section 7.3" ", " "Locale Definition".
Packit 7cfc04
.IP "\fB\(miu\ \fIcode_set_name\fR" 10
Packit 7cfc04
.br
Packit 7cfc04
Specify the name of a codeset used as the target mapping of character
Packit 7cfc04
symbols and collating element symbols whose encoding values are defined
Packit 7cfc04
in terms of the ISO/IEC\ 10646\(hy1:\|2000 standard position constant values.
Packit 7cfc04
.SH OPERANDS
Packit 7cfc04
The following operand shall be supported:
Packit 7cfc04
.IP "\fIname\fR" 10
Packit 7cfc04
Identifies the locale; see the Base Definitions volume of POSIX.1\(hy2008,
Packit 7cfc04
.IR "Chapter 7" ", " "Locale"
Packit 7cfc04
for a description of the use of this name. If the name contains one
Packit 7cfc04
or more
Packit 7cfc04
<slash>
Packit 7cfc04
characters,
Packit 7cfc04
.IR name
Packit 7cfc04
shall be interpreted as a pathname where the created locale definitions
Packit 7cfc04
shall be stored. If
Packit 7cfc04
.IR name
Packit 7cfc04
does not contain any
Packit 7cfc04
<slash>
Packit 7cfc04
characters, the interpretation of the name is implementation-defined
Packit 7cfc04
and the locale shall be public. The ability to create public locales in
Packit 7cfc04
this way may be restricted to users with appropriate privileges. (As a
Packit 7cfc04
consequence of specifying one
Packit 7cfc04
.IR name ,
Packit 7cfc04
although several categories can be processed in one execution, only
Packit 7cfc04
categories belonging to the same locale can be processed.)
Packit 7cfc04
.SH STDIN
Packit 7cfc04
Unless the
Packit 7cfc04
.BR \(mii
Packit 7cfc04
option is specified, the standard input shall be a text file containing
Packit 7cfc04
one or more locale category source definitions, as described in the Base Definitions volume of POSIX.1\(hy2008,
Packit 7cfc04
.IR "Section 7.3" ", " "Locale Definition".
Packit 7cfc04
When lines are continued using the escape character mechanism,
Packit 7cfc04
there is no limit to the length of the accumulated continued line.
Packit 7cfc04
.SH "INPUT FILES"
Packit 7cfc04
The character set mapping file specified as the
Packit 7cfc04
.IR charmap
Packit 7cfc04
option-argument is described in the Base Definitions volume of POSIX.1\(hy2008,
Packit 7cfc04
.IR "Section 6.4" ", " "Character Set Description File".
Packit 7cfc04
If a locale category source definition contains a
Packit 7cfc04
.BR copy
Packit 7cfc04
statement, as defined in the Base Definitions volume of POSIX.1\(hy2008,
Packit 7cfc04
.IR "Chapter 7" ", " "Locale",
Packit 7cfc04
and the
Packit 7cfc04
.BR copy
Packit 7cfc04
statement names a valid, existing locale, then
Packit 7cfc04
.IR localedef
Packit 7cfc04
shall behave as if the source definition had contained a valid category
Packit 7cfc04
source definition for the named locale.
Packit 7cfc04
.SH "ENVIRONMENT VARIABLES"
Packit 7cfc04
The following environment variables shall affect the execution of
Packit 7cfc04
.IR localedef :
Packit 7cfc04
.IP "\fILANG\fP" 10
Packit 7cfc04
Provide a default value for the internationalization variables that are
Packit 7cfc04
unset or null. (See the Base Definitions volume of POSIX.1\(hy2008,
Packit 7cfc04
.IR "Section 8.2" ", " "Internationalization Variables"
Packit 7cfc04
for the precedence of internationalization variables used to determine
Packit 7cfc04
the values of locale categories.)
Packit 7cfc04
.IP "\fILC_ALL\fP" 10
Packit 7cfc04
If set to a non-empty string value, override the values of all the
Packit 7cfc04
other internationalization variables.
Packit 7cfc04
.IP "\fILC_COLLATE\fP" 10
Packit 7cfc04
.br
Packit 7cfc04
(This variable has no affect on
Packit 7cfc04
.IR localedef ;
Packit 7cfc04
the POSIX locale is used for this category.)
Packit 7cfc04
.IP "\fILC_CTYPE\fP" 10
Packit 7cfc04
Determine the locale for the interpretation of sequences of bytes of
Packit 7cfc04
text data as characters (for example, single-byte as opposed to
Packit 7cfc04
multi-byte characters in arguments and input files). This variable has
Packit 7cfc04
no affect on the processing of
Packit 7cfc04
.IR localedef
Packit 7cfc04
input data; the POSIX locale is used for this purpose, regardless of
Packit 7cfc04
the value of this variable.
Packit 7cfc04
.IP "\fILC_MESSAGES\fP" 10
Packit 7cfc04
.br
Packit 7cfc04
Determine the locale that should be used to affect the format and
Packit 7cfc04
contents of diagnostic messages written to standard error.
Packit 7cfc04
.IP "\fINLSPATH\fP" 10
Packit 7cfc04
Determine the location of message catalogs for the processing of
Packit 7cfc04
.IR LC_MESSAGES .
Packit 7cfc04
.SH "ASYNCHRONOUS EVENTS"
Packit 7cfc04
Default.
Packit 7cfc04
.SH STDOUT
Packit 7cfc04
The utility shall report all categories successfully processed, in an
Packit 7cfc04
unspecified format.
Packit 7cfc04
.SH STDERR
Packit 7cfc04
The standard error shall be used only for diagnostic messages.
Packit 7cfc04
.SH "OUTPUT FILES"
Packit 7cfc04
The format of the created output is unspecified. If the
Packit 7cfc04
.IR name
Packit 7cfc04
operand does not contain a
Packit 7cfc04
<slash>,
Packit 7cfc04
the existence of an output file for the locale is unspecified.
Packit 7cfc04
.SH "EXTENDED DESCRIPTION"
Packit 7cfc04
When the
Packit 7cfc04
.BR \(miu
Packit 7cfc04
option is used, the
Packit 7cfc04
.IR code_set_name
Packit 7cfc04
option-argument shall be interpreted as an implementation-defined
Packit 7cfc04
name of a codeset to which the ISO/IEC\ 10646\(hy1:\|2000 standard position constant values shall be
Packit 7cfc04
converted via an implementation-defined method. Both the ISO/IEC\ 10646\(hy1:\|2000 standard
Packit 7cfc04
position constant values and other formats (decimal, hexadecimal, or
Packit 7cfc04
octal) shall be valid as encoding values within the
Packit 7cfc04
.IR charmap
Packit 7cfc04
file. The codeset represented by the implementation-defined name can
Packit 7cfc04
be any codeset that is supported by the implementation.
Packit 7cfc04
.P
Packit 7cfc04
When conflicts occur between the
Packit 7cfc04
.IR charmap
Packit 7cfc04
specification of <\fIcode_set_name\fP>, <\fImb_cur_max\fP>, or
Packit 7cfc04
<\fImb_cur_min\fP> and the implementation-defined interpretation of
Packit 7cfc04
these respective items for the codeset represented by the
Packit 7cfc04
.BR \(miu
Packit 7cfc04
option-argument
Packit 7cfc04
.IR code_set_name ,
Packit 7cfc04
the result is unspecified.
Packit 7cfc04
.P
Packit 7cfc04
When conflicts occur between the
Packit 7cfc04
.IR charmap
Packit 7cfc04
encoding values specified for symbolic names of characters of the
Packit 7cfc04
portable character set and the implementation-defined assignment of
Packit 7cfc04
character encoding values, the result is unspecified.
Packit 7cfc04
.P
Packit 7cfc04
If a non-printable character in the
Packit 7cfc04
.IR charmap
Packit 7cfc04
has a width specified that is not
Packit 7cfc04
.BR \(mi1 ,
Packit 7cfc04
the result will be undefined.
Packit 7cfc04
.SH "EXIT STATUS"
Packit 7cfc04
The following exit values shall be returned:
Packit 7cfc04
.IP "\00" 6
Packit 7cfc04
No errors occurred and the locales were successfully created.
Packit 7cfc04
.IP "\01" 6
Packit 7cfc04
Warnings occurred and the locales were successfully created.
Packit 7cfc04
.IP "\02" 6
Packit 7cfc04
The locale specification exceeded implementation limits or the coded
Packit 7cfc04
character set or sets used were not supported by the implementation,
Packit 7cfc04
and no locale was created.
Packit 7cfc04
.IP "\03" 6
Packit 7cfc04
The capability to create new locales is not supported by the
Packit 7cfc04
implementation.
Packit 7cfc04
.IP >3 6
Packit 7cfc04
Warnings or errors occurred and no output was created.
Packit 7cfc04
.SH "CONSEQUENCES OF ERRORS"
Packit 7cfc04
If an error is detected, no permanent output shall be created.
Packit 7cfc04
.P
Packit 7cfc04
If warnings occur, permanent output shall be created if the
Packit 7cfc04
.BR \(mic
Packit 7cfc04
option was specified. The following conditions shall cause warning
Packit 7cfc04
messages to be issued:
Packit 7cfc04
.IP " *" 4
Packit 7cfc04
If a symbolic name not found in the
Packit 7cfc04
.IR charmap
Packit 7cfc04
file is used for the descriptions of the
Packit 7cfc04
.IR LC_CTYPE
Packit 7cfc04
or
Packit 7cfc04
.IR LC_COLLATE
Packit 7cfc04
categories (for other categories, this shall be an error condition).
Packit 7cfc04
.IP " *" 4
Packit 7cfc04
If the number of operands to the
Packit 7cfc04
.BR order
Packit 7cfc04
keyword exceeds the
Packit 7cfc04
{COLL_WEIGHTS_MAX}
Packit 7cfc04
limit.
Packit 7cfc04
.IP " *" 4
Packit 7cfc04
If optional keywords not supported by the implementation are present in
Packit 7cfc04
the source.
Packit 7cfc04
.P
Packit 7cfc04
Other implementation-defined conditions may also cause warnings.
Packit 7cfc04
.LP
Packit 7cfc04
.IR "The following sections are informative."
Packit 7cfc04
.SH "APPLICATION USAGE"
Packit 7cfc04
The
Packit 7cfc04
.IR charmap
Packit 7cfc04
definition is optional, and is contained outside the locale
Packit 7cfc04
definition. This allows both completely self-defined source files, and
Packit 7cfc04
generic sources (applicable to more than one codeset). To aid
Packit 7cfc04
portability, all
Packit 7cfc04
.IR charmap
Packit 7cfc04
definitions must use the same symbolic names for the portable character
Packit 7cfc04
set. As explained in the Base Definitions volume of POSIX.1\(hy2008,
Packit 7cfc04
.IR "Section 6.4" ", " "Character Set Description File",
Packit 7cfc04
it is implementation-defined whether or not users or applications can
Packit 7cfc04
provide additional character set description files. Therefore, the
Packit 7cfc04
.BR \(mif
Packit 7cfc04
option might be operable only when an implementation-defined
Packit 7cfc04
.IR charmap
Packit 7cfc04
is named.
Packit 7cfc04
.SH EXAMPLES
Packit 7cfc04
None.
Packit 7cfc04
.SH RATIONALE
Packit 7cfc04
The output produced by the
Packit 7cfc04
.IR localedef
Packit 7cfc04
utility is implementation-defined. The
Packit 7cfc04
.IR name
Packit 7cfc04
operand is used to identify the specific locale. (As a consequence,
Packit 7cfc04
although several categories can be processed in one execution, only
Packit 7cfc04
categories belonging to the same locale can be processed.)
Packit 7cfc04
.SH "FUTURE DIRECTIONS"
Packit 7cfc04
None.
Packit 7cfc04
.SH "SEE ALSO"
Packit 7cfc04
.IR "\fIlocale\fR\^"
Packit 7cfc04
.P
Packit 7cfc04
The Base Definitions volume of POSIX.1\(hy2008,
Packit 7cfc04
.IR "Section 6.4" ", " "Character Set Description File",
Packit 7cfc04
.IR "Chapter 7" ", " "Locale",
Packit 7cfc04
.IR "Chapter 8" ", " "Environment Variables",
Packit 7cfc04
.IR "Section 12.2" ", " "Utility Syntax Guidelines"
Packit 7cfc04
.SH COPYRIGHT
Packit 7cfc04
Portions of this text are reprinted and reproduced in electronic form
Packit 7cfc04
from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
Packit 7cfc04
-- Portable Operating System Interface (POSIX), The Open Group Base
Packit 7cfc04
Specifications Issue 7, Copyright (C) 2013 by the Institute of
Packit 7cfc04
Electrical and Electronics Engineers, Inc and The Open Group.
Packit 7cfc04
(This is POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
Packit 7cfc04
event of any discrepancy between this version and the original IEEE and
Packit 7cfc04
The Open Group Standard, the original IEEE and The Open Group Standard
Packit 7cfc04
is the referee document. The original Standard can be obtained online at
Packit 7cfc04
http://www.unix.org/online.html .
Packit 7cfc04
Packit 7cfc04
Any typographical or formatting errors that appear
Packit 7cfc04
in this page are most likely
Packit 7cfc04
to have been introduced during the conversion of the source files to
Packit 7cfc04
man page format. To report such errors, see
Packit 7cfc04
https://www.kernel.org/doc/man-pages/reporting_bugs.html .