1 LOCALEDEF(1)                     User Commands                    LOCALEDEF(1)
   2 
   3 
   4 
   5 NAME
   6        localedef - define locale environment
   7 
   8 SYNOPSIS
   9        localedef [-c] [-v] [-U] [-f charmap]
  10             [-w widthfile] [-i sourcefile]
  11             [-u code_set_name] localename
  12 
  13 
  14 DESCRIPTION
  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
  18        variables; 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
  28        statement. The following categories are supported.
  29 
  30        LC_CTYPE
  31                       Defines character classification and case conversion.
  32 
  33 
  34        LC_COLLATE
  35                       Defines collation rules.
  36 
  37 
  38        LC_MONETARY
  39                       Defines the format and symbols used in formatting of
  40                       monetary information.
  41 
  42 
  43        LC_NUMERIC
  44                       Defines the decimal delimiter, grouping and grouping
  45                       symbol for non-monetary numeric editing.
  46 
  47 
  48        LC_TIME
  49                       Defines the format and content of date and time
  50                       information.
  51 
  52 
  53        LC_MESSAGES
  54                       Defines the format and values of affirmative and
  55                       negative responses.
  56 
  57 
  58 OPTIONS
  59        The following options are supported:
  60 
  61        -c
  62                               Creates permanent output even if warning
  63                               messages have been issued.
  64 
  65 
  66        -v
  67                               Emit verbose debugging output on standard
  68                               output.
  69 
  70 
  71        -U
  72                               Ignore the presence of character symbols that
  73                               have no matching character definition.  This
  74                               facilitates the use of a common locale
  75                               definition file to be used across multiple
  76                               encodings, even when some symbols are not
  77                               present in a given encoding.
  78 
  79                               Support for this option is an illumos extension.
  80 
  81 
  82        -f charmap
  83                               Specifies the pathname of a file containing a
  84                               mapping of character symbols and collating
  85                               element symbols to actual character encodings.
  86                               This option must be specified if symbolic names
  87                               (other than collating symbols defined in a
  88                               collating-symbol keyword) are used. If the -f
  89                               option is not present, the default character
  90                               mapping will be used.
  91 
  92 
  93        -w widthfile
  94                               The path name of the file containing character
  95                               screen width definitions.  If not supplied, then
  96                               default screen widths will be assumed, which
  97                               will generally not account for East Asian
  98                               encodings requiring more than a single character
  99                               cell to display, nor for combining or accent
 100                               marks that occupy no additional screen width.
 101 
 102                               The support for width files is an illumos
 103                               extension.
 104 
 105 
 106        -i sourcefile
 107                               The path name of a file containing the source
 108                               definitions. If this option is not present,
 109                               source definitions will be read from standard
 110                               input.
 111 
 112 
 113        -u code_set_name
 114                               Specifies the name of a codeset used as the
 115                               target mapping of character symbols and
 116                               collating element symbols whose encoding values
 117                               are defined in terms of the ISO/IEC 10646-1:
 118                               2000 standard position constant values. See
 119                               NOTES.
 120 
 121 
 122 OPERANDS
 123        The following operand is supported:
 124 
 125        localename
 126                      Identifies the locale. If the name contains one or more
 127                      slash characters, localename will be interpreted as a
 128                      path name where the created locale definitions will be
 129                      stored. This capability may be restricted to users with
 130                      appropriate privileges. (As a consequence of specifying
 131                      one localename, although several categories can be
 132                      processed in one execution, only categories belonging to
 133                      the same locale can be processed.)
 134 
 135 
 136 OUTPUT
 137        localedef creates a directory of files that represents the locale's
 138        data. The contents of this directory should generally be copied into
 139        the appropriate subdirectory of /usr/lib/locale in order the
 140        definitions to be visible to programs linked with libc.
 141 
 142 
 143 ENVIRONMENT VARIABLES
 144        See environ(5) for definitions of the following environment variables
 145        that affect the execution of localedef: LANG, LC_ALL, LC_COLLATE,
 146        LC_CTYPE, LC_MESSAGES, and NLSPATH.
 147 
 148 EXIT STATUS
 149        The following exit values are returned:
 150 
 151        0
 152              No errors occurred and the locales were successfully created.
 153 
 154 
 155        1
 156              Warnings occurred and the locales were successfully created.
 157 
 158 
 159        2
 160              The locale specification exceeded implementation limits or the
 161              coded character set or sets used were not supported by the
 162              implementation, and no locale was created.
 163 
 164 
 165        >3
 166              Warnings or errors occurred and no output was created.
 167 
 168 
 169 
 170        If an error is detected, no permanent output will be created.
 171 
 172 FILES
 173        /usr/lib/locale/localename/
 174 
 175            The directory containing locale data.
 176 
 177 
 178 ATTRIBUTES
 179        See attributes(5) for descriptions of the following attributes:
 180 
 181 
 182 
 183 
 184        +--------------------+-----------------+
 185        |  ATTRIBUTE TYPE    | ATTRIBUTE VALUE |
 186        +--------------------+-----------------+
 187        |Interface Stability | Standard        |
 188        +--------------------+-----------------+
 189 
 190 SEE ALSO
 191        locale(1), iconv_open(3C), nl_langinfo(3C), strftime(3C),
 192        attributes(5), charmap(5), environ(5), extensions(5), locale(5),
 193        standards(5)
 194 
 195 WARNINGS
 196        If warnings occur, permanent output will be created if the -c option
 197        was specified. The following conditions will cause warning messages to
 198        be issued:
 199 
 200            o      If a symbolic name not found in the charmap file is used for
 201                   the descriptions of the LC_CTYPE or LC_COLLATE categories
 202                   (for other categories, this will be an error condition).
 203 
 204            o      If optional keywords not supported by the implementation are
 205                   present in the source.
 206 
 207 NOTES
 208        When the -u option is used, the code_set_name option-argument is
 209        interpreted as a name of a codeset to which the ISO/IEC 10646-1: 2000
 210        standard position constant values are converted. Both the ISO/IEC
 211        10646-1: 2000 standard position constant values and other formats
 212        (decimal, hexadecimal, or octal) are valid as encoding values within
 213        the charmap file. The codeset can be any codeset that is supported by
 214        the iconv_open(3C) function on the system.
 215 
 216 
 217        When conflicts occur between the charmap specification of
 218        code_set_name, mb_cur_max, or mb_cur_min and the corresponding value
 219        for the codeset represented by the -u option-argument code_set_name,
 220        the localedef utility fails as an error.
 221 
 222 
 223        When conflicts occur between the charmap encoding values specified for
 224        symbolic names of characters of the portable character set and the
 225        character encoding values defined by the US-ASCII, the result is
 226        unspecified.
 227 
 228 
 229 
 230                                  April 9, 2016                    LOCALEDEF(1)