lconv --
Internationalization (native language support) information
Syntax
#include <locale.h>
Description
The lconv structure contains the following members:
Member
Default
Description
decimal_point
"."
Decimal point
thousands_sep
""
Thousands separator
grouping
""
Size of groups of digits
int_curr_symbol
""
International currency symbol
currency_symbol
""
Currency symbol
mon_decimal_point
""
Monetary decimal point
mon_thousands_sep
""
Monetary thousands separator
mon_grouping
""
Monetary groupings
positive_sign
""
Positive sign
negative_sign
""
Negative sign
int_frac_digits
frac_digits
CHAR_MAX CHAR_MAX
Number of digits used to display the
fractions of a monetary unit;
for example, two digits are used for $1.99
p_cs_precedes
CHAR_MAX
Whether the currency_symbol precedes (1) or succeeds
(0) a positive monetary value; for example, $99.97 or .99$
p_sep_by_space
CHAR_MAX
Whether a space separates a currency_symbol from a
positive value; for example, $99.97 (value is 0) or $ 99.97 (value is 1)
n_cs_precedes
CHAR_MAX
Whether a currency_symbol precedes (1)
or succeeds (0) a negative monetary value; for example, $-99.97 or -.99$
n_sep_by_space
CHAR_MAX
Whether a space separates a currency_symbol from a
negative value; for example, $-99.97 (value is 0) or $ -99.97 (value is 1)
p_sign_posn
CHAR_MAX
How to designate a positive monetary value. If
the value is 0, parentheses are used, for example, ($99.97). If
the value is 1, then the value of positive_sign is used;
if 2 the sign string succeeds the value, if 3, the sign string
precedes the value and the currency_symbol; if 4,
the sign string immediately succeeds the
currency_symbol. For example, if positive_sign is
set to ``+'', then the result is +$99.97.
n_sign_posn
CHAR_MAX
How to designate a negative monetary value. Uses the same values
as p_sign_posn, except that the sign string is the
negative_sign string.
If a string member in the lconv structure has the value
"" (the null string) or if a char member has the value
CHAR_MAX, then the value for the member is
is unavailable in the current locale.
CHAR_MAX is usually defined as decimal 127 unless
the program is compiled with the -J compiler option.
The -J option allows the user to
treat char types as unsigned integers instead of signed integers. Thus,
CHAR_MAX is changed in the header file <limits.h> to
the value 255. However, the locale files were built with the
assumption that CHAR_MAX equals 127.
In this case you should use the value 127 explicitly
instead of CHAR_MAX.
NOTE:
Currently, the only locale values supported for C
are the default values listed above.
Different values may be
supported by other languages;
these may be obtained from the appropriate locale documentation.