Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ localedef(1) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

locale(1)

localedef(1)                                                   localedef(1)

NAME
     localedef - define locale

SYNOPSIS
     localedef [-bcqs] [-d[debug-level]] [-f charmap] [-i sourcefile] name

DESCRIPTION
     The localedef command converts source definitions for locales into a
     format that can be used by the functions and commands whose opera-
     tional behavior is determined by the setting of the locale variables.
     This format is defined in the XBD specification, Chapter 5, Locale.

     Every Reliant UNIX system user has the facility to create new locales
     locally. However, only a user with the appropriate privileges (usually
     system administrators) can install these locales on the system so that
     they can be used by functions, applications, and commands. This is
     done either by copying the files created locally to
     /usr/lib/locale/name and /usr/lib/charmap/charmap, or more simply by
     using the -s option.

     localedef reads source definitions for one or more of the categories
     in the locales, which belong to the same locale, from the file speci-
     fied with the -i option (if specified), or from the standard input.

     The name operand indicates the target environment. The command sup-
     ports the creation of locales which are "public" (i.e. can be accessed
     generally), as well as locales which are private (i.e. with restricted
     access rights). On Reliant UNIX systems, only users with the appropri-
     ate privileges can create or alter general access locales.

     Every category source definition is indicated by the name of the
     accompanying environment variable and is terminated with an END
     category-name instruction. The following categories are supported:

     LCCTYPE       Defines character classification and case conversion.

     LCCOLLATE     Defines collation rules.

     LCMONETARY    Defines the format and symbols used for the formatting
                    of monetary information.

     LCNUMERIC     Defines the decimal point, grouping, and "grouping"
                    symbol for the editing of non-monetary numeric informa-
                    tion.

     LCTIME        Defines the format and contents of date and time speci-
                    fications.

     LCMESSAGES    Defines the format and values of yes/no responses
                    (affirmations and negations).





Page 1                       Reliant UNIX 5.44                Printed 11/98

localedef(1)                                                   localedef(1)

OPTIONS
     -b   Suppresses warnings for downwards compatibility. The output
          created by the localedef command can be used by every interna-
          tionalized Reliant UNIX application, and can also be used by
          older applications available before the introduction of
          localedef. The internationalization mechanisms of earlier appli-
          cations were less differentiated than current methods. If a
          localedef source file contains new mechanisms and the -b option
          is not used, warnings are output as the older applications cannot
          use this new functionality.

     -c   Creates an output file, even if warning message is output.

     -d[debug-level]
          Test help messages (grammatical information) are written to the
          standard output. This option is particularly useful for those
          developing new locales. The debug-level integer value (if
          present), must not be separated from the letter "d" by a blank.

     -f charmap
          Specifies the pathname of a file which contains an assignment of
          the symbolic character symbols and collating element symbols to
          the actual character coding (character map). The charmap format
          is described in the XBD specification, Section 4.4, Character Set
          Description File. This option must be specified if symbolic names
          are used that were not defined using the collating-symbol key
          word. If the -f option is not specified, the character assignment
          defined in the /usr/lib/charmap/posix file (ISO 8859-1) is used.

     -i inputfile
          The pathname of a file which contains the source definitions. If
          this option is not specified, the source definitions of the
          default input are read. The format of the input file is described
          in the XBD specification, Section 5.3, Locale Definition.

     -q   No output is written to the standard output.

     -s   Option for the system administrator. Installs the generated
          locale (and possibly the new charmap file) in
          /usr/lib/locale/name (or in /usr/lib/charmap/charmap).

     name Specifies the locale. The use of this name is described in the
          XBD specification, Chapter 5, Locale.

          -  If name contains one or more slashes, name is interpreted as a
             pathname, in which the definitions created for the locales are
             saved.

          -  If name does not contain a slash and the -s option is used,
             the locale can be accessed generally and is generated under
             /usr/lib/locale/name. This facility is restricted to users
             with the appropriate privileges.


Page 2                       Reliant UNIX 5.44                Printed 11/98

localedef(1)                                                   localedef(1)

          -  If name does not contain a slash and the -s option is not
             used, the locale is private, and is generated in the current
             directory.

          Because only one name can be specified, the only categories that
          can be processed in a call are those that belong to the same
          locale.

STANDARD INPUT
     If the -i option is not specified, the standard input must be a text
     file containing one or more source definitions for categories for
     locales, as described in the XBD specification, Section 5.3, Locale
     Definition. If lines are continued using the escape mechanism, there
     is no length restriction for the entire input line.

INPUT FILES
     The file containing the description of a character set (charmap argu-
     ment in -f) is described in the XBD specification, Section 4.4, Char-
     acter Set Description File. If a source definition of a category for
     an locale contains the copy instruction (as described in the XBD spec-
     ification, Chapter 5, Locale) and this instruction specifies a valid
     locale, localedef behaves as if the source definition contained a
     valid source definition of the category for the locale specified.

ENVIRONMENT VARIABLES
     The following environment variables affect the execution of localedef:

     LANG           Specifies a default value for the locale variables that
                    are unset or null. If LANG is unset or null, the corre-
                    sponding default value from the locale is used. If the
                    locale variable contains an invalid setting, the com-
                    mand behaves as if none of the variables had been
                    defined.

     LCALL         If this variable is set, i.e. it is not empty, this
                    value overwrites the values of all other variables for
                    the locale.

     LCCOLLATE     (This variable does not affect localedef; the POSIX
                    locale is used for this category.)

     LCCTYPE       Determines the locale for the interpretation of
                    sequences of bytes (e.g. single-byte as opposed to mul-
                    tibyte characters in arguments and input files). This
                    variable has no effect on the processing of command
                    input files. The POSIX locale is used here, regardless
                    of the value of the variable.

     LCMESSAGES    Determines the format and contents of messages.

     NLSPATH        Determines the location of message catalogs for the
                    processing of LCMESSAGES.


Page 3                       Reliant UNIX 5.44                Printed 11/98

localedef(1)                                                   localedef(1)

OUTPUT FILES
     The format of the created output corresponds to the format of the
     internationalization database on Reliant UNIX systems:

     name (if slashes are contained) or /usr/lib/locale/name (without
     slashes and with the -s option) or ./name (without slashes and without
     the -s option) is the pathname of a directory containing the following
     newly generated files:

     LCCOLLATE     File with collating information

     LCCTYPE       File with information on the character type (ctype)

     LCMONETARY    File with monetary information

     LCNUMERIC     File with numeric information

     LCTIME        File with date and time information

     LCMESSAGES    Directory with message information

     LCMESSAGES/Xopeninfo
                    File with yes/no information

     locinfo       File with information on the name and path of the char-
                    acter map

     A copy of the character map is also created in /usr/lib/charmap if the
     -f and -s options are used.

EXIT STATUS
     The following exit values are transferred:

     0  No errors occurred and the locales were successfully created.

     1  Warnings were output, but the locales were created successfully
        nonetheless.

     2  The locale specification exceeded implementation limits or the
        coded character set or sets used were not supported by the imple-
        mentation. No locale was created.

     4  Warnings occurred and no output was created.











Page 4                       Reliant UNIX 5.44                Printed 11/98

localedef(1)                                                   localedef(1)

CONSEQUENCES OF ERRORS
     If an error is detected in the input file, no output file is created.

     If warnings occur, an output file is created provided that the -c
     option was specified. The following conditions will cause warning mes-
     sages to be output:

     -  A symbolic name not contained in the charmap file was used for the
        description of the LCCTYPE or LCCOLLATE categories (for other
        categories this causes an error condition).

     -  The number of operands for the order keyword exceeds the
        {COLLWEIGHTSMAX} limit.

     -  The source contains optional keywords which are not supported by
        the implementation.

APPLICATION USAGE
     The character map definition is optional, and is not contained in the
     locale definition. This allows both completely self-defined source
     files and generic sources (applicable to more than one coded character
     set). To aid portability all character map definitions must have the
     same symbolic name for portable character sets. As described in the
     XBD specification, Section 4.4, Character Set Description File, it
     depends on the relevant implementation whether users or applications
     can use additional character set description files. Therefore, the -f
     option might only operate correctly if a charmap supported by the
     implementation is specified.

SEE ALSO
     locale(1).

     X/Open CAE Specification. System Interface Definitions, Issue 4 (XBD).
     ISBN: 1-872630-46-4




















Page 5                       Reliant UNIX 5.44                Printed 11/98

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026