localeconv()
.
Some of the information is available in an alternative form via nl_langinfo()
.
These item names are the keywords recognized by the localedef utility when defining a locale. They are similar to the member names of the lconv
structure defined in locale.h
; localeconv()
returns {CHAR_MAX
} for unspecified integer items and the empty string ( "" ) for unspecified or size zero string items.
In a locale definition file, the operands are strings, formatted as indicated by the grammar in Locale Definition Grammar. For some keywords, the strings can only contain integers. Keywords that are not provided, string values set to the empty string ( "" ), or integer keywords set to -1, shall be used to indicate that the value is not available in the locale.
| name of an existing locale which shall be used as the definition of this category. If this keyword is specified, no other keyword shall be specified. This is a localedef utility keyword, unavailable through localeconv(). | ||||
|
The non-monetary numeric formatting definitions for the POSIX locale follow; the code listing depicting the localedef input, the table representing the same information with the addition of localeconv() values, and nl_langinfo() constants.
LC_NUMERIC # This is the POSIX locale definition for the LC_NUMERIC category. # decimal_point "" thousands_sep "" grouping -1 # END LC_NUMERIC
locale