This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

LC_MONETARY:int_p_sep_by_space is ignored


I've tried to get the LC_MONETARY formatting to work properly, both
for Danish which want "kr 1,00" and "DKK 1,00" and American which
wants "$1,00" and "USD 1,00".  In the process, I discovered that with
the current implementation it is impossible to specify a locale which
will give us both these possibilities.

The reason is simple.  Only LC_MONETARY:int_frac_digits is used from
the set of int_* variables.  More spesific, int_[np]_sep_by_space is
required to get this working, and the value of this variable is
ignored.

Looking at page 99 in the TR 14652, I see that the correct setting for
en_US to get "-$1.00" and "-USD 1.00", should be the following values:

  currency_symbol    "<$>"
  negative_sign      "<->"
  n_cs_precedes      1
  n_sign_posn        1
  n_sep_by_space     0

  int_curr_symbol    "<U><S><D>< >"
  int_n_cs_precedes  1
  int_n_sign_posn    1
  int_n_sep_by_space 1

But this do not work, as the int_n_sep_by_space is ignored.  Checking
the code in stdlib/strfmon.c confirms this.  Do you agree with my
findings?  I'll try to make some patches to fix it.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]