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]

Re: LC_MONETARY and incorrect danish locale?


On Sun, Jun 15, 2003 at 06:56:27PM +0200, Petter Reinholdtsen wrote:
> 
> 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?

Hmm, it is customary to have a space as the last character in 
int_curr_symbol. I believe localedef would not accept it otherwise.
One should then not have a space preceding the amount
in the international formatting.

Best regards
Keld


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