HP-UX Reference (11i v3 07/02) - 5 Miscellaneous Topics (vol 9)

e
environ(5) environ(5)
NAME
environ - user environment
DESCRIPTION
An array of strings called the environment is made available by exec(2) when a process begins. By con-
vention, these strings have the form name=value. The following names are used by various commands
(listed in alphabetical order):
HOME Name of the user’s login directory, set by login(1) from the password file (see passwd(4)).
LANG Identifies the user’s requirements for native language, local customs and coded character set, if
the environment variables LC_ALL, LC_COLLATE, LC_CTYPE
, LC_MESSAGES ,
LC_MONETARY , LC_NUMERIC , and LC_TIME are unset or null.
The format of LANG is:
LANG=language[_territory][.
codeset]
The valid values for LANG are supported locales. (See lang(5).) Native Language Support
(NLS) is initiated at run-time by calling setlocale(3C). The following call to
setlocale()
binds the execution of a program to the user’s language requirements:
setlocale(LC_ALL,"");
This setlocale() call initializes the program locale from the environment variables associ-
ated with setlocale() . LANG provides the necessary defaults if any of the category-
specific environment variables are not set or set to the empty string.
The LANG environment variable can have a maximum length of SL_NAME_SIZE bytes (see
header file <locale.h> ).
LANGOPTS Defines language options for mode and data order in the form:
LANGOPTS=[mode][_order]
LANGOPTS
values are given in English as an ASCII character string. mode describes the
mode of a file where l (ell) represents Latin mode and n represents non-Latin mode. Non-
Latin mode is assumed for values other than l and n. order describes the data order of a file
where k is keyboard order and s is screen order.
LC_ALL Determines the values for all locale categories. The value of LC_ALL has precedence over any
of the other environment variables LC_COLLATE , LC_CTYPE , LC_MESSAGES ,
LC_MONETARY , LC_NUMERIC , LC_TIME, and LANG.
LC_COLLATE , LC_CTYPE , LC_MESSAGES , LC_MONETARY , LC_NUMERIC , and LC_TIME
Determines the user’s requirements for language, territory, and codeset with respect to char-
acter collation, character classification and conversion, output messages, currency symbol and
monetary value format, numeric data presentation, and time formats, respectively. If
LC_ALL and any of these are not defined in the environment, LANG provides the defaults.
Syntax for the environment variables
LC_COLLATE , LC_CTYPE, LC_MESSAGES ,
LC_MONETARY , LC_NUMERIC , and LC_TIME is:
language[_territory][.codeset][@modifier]
The language field conforms with ISO 639 standard for language names and the territory field
conforms with the ISO 3166 territory names. For a list of the locale names, see lang(5).
The @modifier field allows the user to select between more than one value of a category within
the same language definition. HP-UX does not currently provide locales with modifiers.
The values of the locale categories are determined by a precedence order; the first condition
met below determines the value:
1. If the LC_ALL environment variable is defined and is not null, the value of LC_ALL is
used.
2. If the LC_* environment variable (LC_COLLATE, LC_CTYPE, LC_MESSAGES ,
LC_MONETARY , LC_NUMERIC , LC_TIME) is defined and is not null, the value of the
environment variable is used to initialize the category that corresponds to the environment
variable.
HP-UX 11i Version 3: February 2007 1 Hewlett-Packard Company 135