HPUX localedef[1m]



localedef in anderen Kapiteln des hpux Handbuch: localedef.4




 localedef(1M)                                                 localedef(1M)





 NAME
      localedef - generate and display locale.inf file

 SYNOPSIS
      localedef [-c] [-f charmap_file] [-i input_file] [locale_name]

      localedef -d [-o format] locale_name

      localedef -n [-i input_file]

 DESCRIPTION
      localedef sets up the language environment for the named locale.
      localedef reads a localedef script (see localedef(4) for a detailed
      description) from standard input (default) or from input_file, creates
      a file called locale.inf, and installs this file in the appropriate
      directory.

    Options
      localedef recognizes the following options:

      -c             Create permanent output even if warning messages have
                     been generated.

      -d             (Dump) Display contents of locale.inf file representing
                     named locale.  The contents are written to standard
                     output in a form suitable for input to localedef so
                     that the locale can be modified and recreated.  The
                     locale.inf file is searched for at pathname
                     /usr/lib/nls/locale_name.  If this option is specified,
                     the -f, -i, and -n options are meaningless.

      -f charmap_file
                     Use charmap_file to interpret symbolic names (of the
                     form <name>) in the localedef script.  This option must
                     be used if symbolic names are used in the localedef
                     script. See charmap(4) for a description of the format
                     of a charmap_file.

      -i input_file  Use input_file as the source of the localedef script
                     instead of standard input.

      -n input_file  (noinstall) Create the locale.inf file in the current
                     directory, using input_file as the source localedef
                     script.

      -o format      Specify the format of character output with the -d
                     option.  This option has no effect except when used
                     with -d.  The arguments c, d, o and x options cause
                     localedef to output each non-printable character code
                     in the ``character constant'', ``decimal constant'',
                     ``octal constant'', and ``hexadecimal constant'' form,



 Hewlett-Packard Company            - 1 -     HP-UX Release 9.0: August 1992






 localedef(1M)                                                 localedef(1M)





                     respectively.  Without the -o option, localedef
                     displays each printable character code in the
                     ``character constant'' form and non-printable character
                     code in the ``hexadecimal constant'' form.  The
                     character constants have the form:

                          Type   Form
                            c    c                 where c is a character
                            d  \dc[c[c]]           where c is a decimal
                                                   digit
                            o  \c[c[c]]            where c is an octal digit
                            x  \xcc                where c is a hexadecimal
                                                   digit

      locale_name    This argument is not required, and is ignored, if the
                     input_file contains the langname keyword (see
                     localedef(4)).  Otherwise, locale_name identifies the
                     name of the language following the naming convention of
                     the LANG environment variable (see environ(5)):

                          language[_territory][.codeset]

      This is a brief description of the components that make up a locale.
      For a complete description of the form and syntax of a localedef
      script, see localedef(4).  For a complete description of the form and
      effects of a charmap file, see charmap(4).

      Seven categories of data in the locale.inf file are recognized by
      setlocale(3C), and make up a language definition:

           LC_COLLATE          Information in this category affects behavior
                               of regular-expressions and NLS string-
                               collation functions.

           LC_CTYPE            Information in this category affects behavior
                               of character classification and conversion
                               functions.

           LC_MONETARY         Information in this category affects behavior
                               of functions that handle monetary values.

           LC_NUMERIC          Information in this category affects handling
                               of the radix character in formatted-
                               input/output and string-conversion functions.

           LC_TIME             Information in this category affects behavior
                               of time-conversion functions.

           LC_MESSAGES         This category contains information affecting
                               interpretation of yes/no responses.




 Hewlett-Packard Company            - 2 -     HP-UX Release 9.0: August 1992






 localedef(1M)                                                 localedef(1M)





           LC_ALL              This category contains language-specific
                               information that does not belong to any of
                               the above categories.

      A localedef script also consists of seven categories.  The beginning
      of each category is identified by a category tag having the form
      LC_category where category is one of the following: CTYPE, COLLATE,
      MONETARY, NUMERIC, TIME, MESSAGES, or ALL.  The end of each category
      is identified by a tag consisting of the word END followed by a space
      and the category identifier; for example, END LC_ALL.  Categories can
      appear in any order in the ocaledef script except that, for POSIX.2
      conformance, LC_ALL should be last.  All category specifications are
      optional.  If a category is not specified, setlocale() sets up the
      default ``C'' locale for that category (see setlocale(3C) and
      lang(5)).

      Each category is composed of one or more statements.  Each statement
      begins with a keyword followed by one or more expressions.  An
      expression is a set of well-formed metacharacters, strings, and
      constants.  localedef also recognizes comments and separators.

      More than one definition can be specified for each category.  If a
      category contains more than one definition, each additional definition
      must be named via the modifier keyword described in localedef(4).  The
      first set of specifications is the default definition which might or
      might not have a modifier name.

      Any category can be specified by the keyword copy followed by the name
      of a valid locale.  This causes the information for the category to be
      identical to that in the named locale.  Note that the copy keyword, if
      used for a category, must be the first and only keyword following the
      category tag.

 EXTERNAL INFLUENCES
    Environment Variables
      LANG determines the locale to use when neither LC_ALL or the other
      category variables specify a locale.

      LC_ALL determines locale to be used.  It overrides any values
      specified by LANG or any other LC_* variables.

      LC_CTYPE determines the printable characters when the -d option is
      specified.  It also affects interpretation of characters in arguments
      as single- or multi-byte. LC_CTYPE has no effect on the processing of
      localedef, which behaves as if LC_CTYPE were set to the C locale.

      If LC_CTYPE is not specified in the environment or is set to the empty
      string, a default of ``C'' (see lang(5)) is used instead of LC_CTYPE.

      LC_MESSAGES determines the language in which messages are displayed.




 Hewlett-Packard Company            - 3 -     HP-UX Release 9.0: August 1992






 localedef(1M)                                                 localedef(1M)





    International Code Set Support
      Single- and multi-byte character code sets are supported.

 RETURN VALUE
      localedef returns the following values:

            0    No errors occurred and the locale was successfully created.
            1    Warnings occurred and the locale was successfully created.
            2    The locale specification exceeded implementation limits or
                 the coded character set used is not supported.
           >3    Warnings or errors occurred, and no output was generated.

 AUTHOR
      localedef was developed by HP.

 FILES
      /usr/lib/nls/config
      /usr/lib/nls/language[/territory][/codeset]/locale.inf

 SEE ALSO
      locale(1), localedef(4), charmap(4), setlocale(3C), environ(5).

 STANDARDS CONFORMANCE
      localedef: POSIX.2, XPG4






























 Hewlett-Packard Company            - 4 -     HP-UX Release 9.0: August 1992