localeconv.3c (2010 09)
l
localeconv(3C) localeconv(3C)
For int_p_sep_by_space
and int_n_sep_by_space
, the fourth character of
int_curr_symbol
is used instead of a space for UNIX 2003 conforming applications.
The values of
p_sign_posn and n_sign_posn are interpreted according to the following:
0 Parentheses surround the quantity and
currency_symbol
or int_curr_symbol
.
1 The sign string precedes the quantity and
currency_symbol or
int_curr_symbol.
2 The sign string succeeds the quantity and
currency_symbol or int_curr_symbol
.
3 The sign string immediately precedes the currency_symbol
or int_curr_symbol
.
4 The sign string immediately succeeds the currency_symbol
or int_curr_symbol
.
localeconv() behaves as if no library function calls
localeconv().
EXTERNAL INFLUENCES
Locale
The
LC_NUMERIC category influences the decimal_point
, thousands_sep
, and grouping
members of the structure referenced by the pointer returned from a call to
localeconv().
The
LC_MONETARY category influences all of the other members of this structure.
International Code Set Support
Single and multibyte character codesets are supported.
RETURN VALUE
localeconv() returns a pointer to the filled-in struct lconv.
EXAMPLES
The following table illustrates the formatting used in five languages for monetary quantities.
Country Positive format Negative format International format
en_US.iso88591 $1,234.56 -$1,234.56 USD 1,234.56
it_IT.iso88591 L.1.234 -L.1.234 ITL.1.234
nl_NL.iso88591 F 1.234,56 F -1.234,56 NLG 1.234,56
no_NO.iso88591 kr1.234,56 kr1.234,56- NOK 1.234,56
pt_PT.iso88591 1,234$56 -1,234$56 PTE 1,234$56
For these five languages, the respective values for the monetary members of the structure returned by
localeconv() are:
en_US. it_IT. nl_NL. no_NO. pt_PT.
iso88591 iso88591 .iso88591 iso88591 iso88591
int_curr_symbol USD ITL. NLG NOK PTE
currency_symbol $ L. F kr $
mon_decimal_point . "" , , $
mon_thousands_sep , . . . ,
mon_grouping \3 \3 \3 \3 \3
positive_sign "" "" "" "" ""
negative_sign - - - - -
int_frac_digits 2 0 2 2 2
frac_digits 2 0 2 2 2
p_cs_precedes 1 1 1 1 0
p_sep_by_space 0 0 1 0 0
n_cs_precedes 1 1 1 1 0
n_sep_by_space 0 0 1 0 0
p_sign_posn 1 1 1 1 1
n_sign_posn 4 1 4 2 1
WARNINGS
The structure returned by localeconv() should not be modified by the calling program. Calls to set-
locale() with categories LC_ALL, LC_MONETARY,orLC_NUMERIC can overwrite the contents of the
HP-UX 11i Version 3: September 2010 − 3 − Hewlett-Packard Company 3