Skip to content
EntityQ1202471· pop 16· linked from 49 articles

standard UNIX utility

Described at

The locale utility shall write information about the current locale environment, or all public locales, to the standard output. For the purposes of this section, a public locale is one provided by the implementation that is accessible to the application. When locale is invoked without any arguments, it shall summarize the current locale environment for each locale category as determined by the settings of the environment variables defined in XBD Locale . Specifying a keyword name shall select the named keyword and the category containing that keyword. Specifying a category name shall select the named category and all keywords in that category. Write information about all available public locales. The available locales shall include POSIX , representing the POSIX locale. The manner in which the implementation determines what other locales are available is implementation-defined. Write the names of selected locale categories; see the STDOUT section. The -c option increases readability when more than one category is selected (for example, via more than one keyword name or via a category name). It is valid both with and without the -k option. Write the names and values of selected keywords. The implementation may omit values for some keywords; see the OPERANDS section. Provide a default value for the internationalization variables that are unset or null. (See XBD Internationalization Variables for the precedence of internationalization variables used to determine the values of locale categories.) If set to a non-empty string value, override the values of all the other internationalization variables. Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multi-byte characters in arguments and input files). Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error. [XSI) ] ![[Option Start]]( Determine the location of message catalogs for the processing of LC MESSAGES. ![[Option End]]( The application shall ensure that the LANG, LC , and [XSI) ] ![[Option Start]]( NLSPATH ![[Option End]]( environment variables specify the current locale environment to be written out; they shall be used if the -a option is not specified. If locale is invoked without any options or operands, the names and values of the LC environment variables described in this volume of POSIX.1-2017 shall be written to the standard output, one variable per line, and each line using the following format. Only those variables set in the environment and not overridden by LC ALL shall be written using this format: The and shown above shall be properly quoted for possible later reentry to the shell. The shall not be quoted using double-quotes (so that it can be distinguished by the user from the case, which always requires double-quotes). If keywords are also selected for writing (see following items), the category name output shall precede the keyword output for that category. If the keyword was charmap , the name of the charmap (if any) that was specified via the localedef -f option when the locale was created shall be written, with the word charmap as . where the is that identified by the escape char keyword in the current locale; see XBD Locale Definition . Compound keyword values (list entries) shall be separated in the output by characters. When included in keyword values, the , , double-quote, and any control character shall be preceded (escaped) with the escape character. If the keyword was charmap , the name of the charmap (if any) that was specified via the localedef -f option when the locale was created shall be written. Implementations are not required to write out the actual values for keywords in the categories LC CTYPE and LC COLLATE ; however, they must write out the categories (allowing an application to determine, for example, which character classes are available). The -c option was included

Excerpt from a page describing this subject · 16,682 chars · not written by Vinony

Wikidata facts

Show 2 more facts
Sources (3)

via Wikidata · CC0

Connections

Categories