LOCALEDEF(1) | General Commands Manual | LOCALEDEF(1) |
localedef
— define
locale environment
localedef |
[-bcDlUv ] [-f
charmap] [-i
sourcefile] [-u
codeset] [-w
widthfile] localename |
The localedef
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 environ(7).
The utility reads source definitions for one or more locale
categories belonging to the same locale from the file named in the
-i
option (if specified) or from standard input.
Each category source definition is identified by the corresponding environment variable name and terminated by an END category-name statement. The following categories are supported:
LC_CTYPE
LC_COLLATE
LC_MONETARY
LC_NUMERIC
LC_TIME
LC_MESSAGES
The following options are supported:
-b
-c
-D
-f
charmap-f
option is not
present, the default character mapping will be used.-i
sourcefile-l
-u
codeset-U
-v
-w
widthfile-V
versionThe following operands are required:
localedef
creates a directory of files
that represents the locale's data, unless instructed otherwise by the
-D
( BSD output) option. The contants of this
directory should generally be copied into the appropriate subdirectory of
/usr/share/locale in order the definitions to be
visible to programs linked with libc.
See environ(7) for definitions of the following
environment variables that affect the execution of
localedef
: LANG
,
LC_ALL
, LC_COLLATE
,
LC_CTYPE
, LC_MESSAGES
,
LC_MONETARY
, LC_MUMERIC
,
LC_TIME
, and NLSPATH
.
The following exit values are returned:
If an error is detected, no permanent output will be created.
locale(1), iconv_open(3), nl_langinfo(3), querylocale(3), strftime(3), environ(7)
If warnings occur, permanent output will be created if the
-c
option was specified. The following conditions
will cause warning messages to be issued:
When the -u
option is used, the
codeset 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
iconv_open
(3)
function.
When conflicts occur between the charmap
specification of codeset,
mb_cur_max, or
mb_cur_min
and the corresponding value for the codeset represented by the
-u
option-argument codeset,
the localedef
utility fails with an error.
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.
localedef
first appeared in
FreeBSD 11.
It was written by Garrett D'Amore <garrett@nexenta.com> for illumos. John Marino <draco@marino.st> provided the alternations necessary to compile cleanly on DragonFly. Baptiste Daroussin <bapt@FreeBSD.org> ported it to FreeBSD and converted it to tree(3).
June 29, 2023 | Mac OS X 14 |