LC_MONETARY and incorrect danish locale?

Petter Reinholdtsen pere@hungry.com
Sun Jun 15 16:56:00 GMT 2003


I wrote a test case for the danish locale (da_DK), but was supprised
by the formatting of the international currency.  This is my current
successful test (for localedata/tst-fmon.out):

  #
  # Check the Danish locales (da_DK)
  #
  da_DK.ISO-8859-1	%n	123.45		kr 123,45
  da_DK.ISO-8859-1	%n	-123.45		kr -123,45
  da_DK.ISO-8859-1	%n	3456.781	kr 3.456,78

  da_DK.ISO-8859-1	%i	1.23		DKK  1,23
  da_DK.ISO-8859-1	%i	1234.56		DKK  1.234,56

Notice the double space after DKK.  I believe this should be a single
space.  But I am not sure how to change the locale to only use one
space there.  The current da_DK look like this:

  LC_MONETARY
  int_curr_symbol         "<U0044><U004B><U004B><U0020>"
  currency_symbol         "<U006B><U0072>"
  mon_decimal_point       "<U002C>"
  mon_thousands_sep       "<U002E>"
  mon_grouping            3;3
  positive_sign           ""
  negative_sign           "<U002D>"
  int_frac_digits         2
  frac_digits             2
  p_cs_precedes           1
  p_sep_by_space          2
  n_cs_precedes           1
  n_sep_by_space          2
  p_sign_posn             4
  n_sign_posn             4
  END LC_MONETARY

Notice the space (U0020) at the end of int_curr_symbol.  Removing the
space result in only 'DKK' being printed.  This looks like a bug to
me.  How is this supposed to work?  How is the locale supposed to look
to get it to print "DKK 1,23" for the value 1.23?



More information about the Libc-alpha mailing list