Why do Monitor Solution command lines contain LC_ALL=C?
The following article is from Source: http://www.opengroup.org/pubs/online/7908799/xbd/locale.html#tag_005_002.
The LC_ALL entry is an environment varilable dealing with locale settings. Following is information related to local settings:
This section describes environment variables that are relevant to the operation of internationalised interfaces described in the CAE Specification, System Interfaces and Headers, Issue 5 and the CAE Specification, Commands and Utilities, Issue 5.
Users may use the following environment variables to announce specific localisation requirements to applications. Applications must retrieve this information using the setlocale() function to initialise the correct behaviour of the internationalised interfaces. The descriptions of the internationalisation environment variables describe the resulting behaviour only when the application locale is initialised in this way.
This variable determines the locale category for native language, local customs and coded character set in the absence of the LC_ALL and other LC_* ( LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, LC_TIME) environment variables. This can be used by applications to determine the language to use for error messages and instructions, collating sequences, date formats, and so forth.
This variable determines the values for all locale categories. The value of the LC_ALL environment variable has precedence over any of the other environment variables starting with LC_ ( LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, LC_TIME) and the LANG environment variable.
This variable determines the locale category for character collation. It determines collation information for regular expressions and sorting, including equivalence classes and multi-character collating elements, in various utilities and the strcoll() and strxfrm() functions. Additional semantics of this variable, if any, are implementation-dependent.
This variable determines the locale category for character handling functions, such as tolower(), toupper() and isalpha(). This environment variable determines the interpretation of sequences of bytes of text data as characters (for example, single- as opposed to multi-byte characters), the classification of characters (for example, alpha, digit, graph) and the behaviour of character classes. Additional semantics of this variable, if any, are implementation-dependent.
This variable determines the locale category for processing affirmative and negative responses and the language and cultural conventions in which messages should be written. It also affects the behaviour of the catopen() function in determining the message catalogue. Additional semantics of this variable, if any, are implementation-dependent. The language and cultural conventions of diagnostic and informative messages whose format is unspecified by this specification set should be affected by the setting of LC_MESSAGES.
This variable determines the locale category for monetary-related numeric formatting information. Additional semantics of this variable, if any, are implementation-dependent.
This variable determines the locale category for numeric formatting (for example, thousands separator and radix character) information in various utilities as well as the formatted I/O operations in printf() and scanf() and the string conversion functions in strtod(). Additional semantics of this variable, if any, are implementation-dependent.
This variable determines the locale category for date and time formatting information. It affects the behaviour of the time functions in strftime(). Additional semantics of this variable, if any, are implementation-dependent.
This variable contains a sequence of templates that the catopen() function uses when attempting to locate message catalogues. Each template consists of an optional prefix, one or more substitution fields, a filename and an optional suffix. For example:
NLSPATH="/system/nlslib/%N.cat"defines that catopen() should look for all message catalogues in the directory /system/nlslib, where the catalogue name should be constructed from the name parameter passed to catopen() (%N), with the suffix .cat. Substitution fields consist of a "%" symbol, followed by a single-letter keyword. The following keywords are currently defined:
- The value of the name parameter passed to catopen().
- The value of the LC_MESSAGES category.
- The language element from the LC_MESSAGES category.
- The territory element from the LC_MESSAGES category.
- The codeset element from the LC_MESSAGES category.
- A single % character.
An empty string is substituted if the specified value is not currently defined. The separators underscore (_) and period (.) are not included in %t and %c substitutions.
Templates defined in NLSPATH are separated by colons (:). A leading or two adjacent colons :: is equivalent to specifying %N. For example:
NLSPATH=":%N.cat:/nlslib/%L/%N.cat"indicates to catopen() that it should look for the requested message catalogue in name, name.cat and /nlslib/category/name.cat, where category is the value of the LC_MESSAGES category of the current locale.
Users should not set the NLSPATH variable unless they have a specific reason to override the default system path. Setting NLSPATH to override the default system path produces undefined results in the standard utilities and in applications with appropriate privileges.
The environment variables LANG, LC_ALL, LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, LC_TIME, (LC_*), and NLSPATH provide for the support of internationalised applications. The standard utilities make use of these environment variables as described in this section and the individual ENVIRONMENT VARIABLES sections for the utilities. If these variables specify locale categories that are not based upon the same underlying codeset, the results are unspecified.
The values of locale categories are determined by a precedence order; the first condition met below determines the value:
- If the LC_ALL environment variable is defined and is not null, the value of LC_ALL is used.
- 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 initialise the category that corresponds to the environment variable.
- If the LANG environment variable is defined and is not null, the value of the LANG environment variable is used.
- If the LANG environment variable is not set or is set to the empty string, the implementation-dependent default locale is used.
If the locale value is "C" or "POSIX", the POSIX locale is used and the standard utilities behave in accordance with the rules in
If the locale value begins with a slash, it is interpreted as the pathname of a file that was created in the output format used by the localedef utility; see OUTPUT FILES under localedef. Referencing such a pathname will result in that locale being used for the indicated category.
If the locale value has the form:
it refers to an implementation-provided locale, where settings of language, territory and codeset are implementation-dependent.
LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC and LC_TIME are defined to accept an additional field "@modifier ", which allows the user to select a specific instance of localisation data within a single category (for example, for selecting the dictionary as opposed to the character ordering of data). The syntax for these environment variables is thus defined as:
For example, if a user wanted to interact with the system in French, but required to sort German text files, LANG and LC_COLLATE could be defined as:
This could be extended to select dictionary collation (say) by use of the @modifier field; for example:
LC_COLLATE=De_DE@dictAn implementation may support other formats.
If the locale value is not recognised by the implementation, the behaviour is unspecified.
At run time, these values are bound to a program's locale by calling the setlocale() function.
Additional criteria for determining a valid locale name are implementation-dependent.
All systems provide a POSIX locale, also known as the C locale. The behaviour of standard utilities and functions in the POSIX locale is as if the locale was defined via the localedef utility with input data from the POSIX locale tables in Locale Definition .
The tables in
Locale Definition describe the characteristics and behaviour of the POSIX locale for data consisting entirely of characters from the portable character set and the control character set. For other characters, the behaviour is unspecified. For C-language programs, the POSIX locale is the default locale when the setlocale() function is not called.
The POSIX locale can be specified by assigning to the appropriate environment variables the values C or POSIX.
All implementations define a locale as the default locale, to be invoked when no environment variables are set, or set to the empty string. This default locale can be the POSIX locale or any other, implementation-dependent locale. Some implementations may provide facilities for local installation administrators to set the default locale, customising it for each location. This specification set does not require such a facility.