This is the mail archive of the
libc-locales@sources.redhat.com
mailing list for the GNU libc locales project.
Correct glibc locale hr_HR?
- From: Petter Reinholdtsen <pere at hungry dot com>
- To: Tomislav Vujec <tvujec at carnet dot hr>, Tomislav Vujec <tvujec at redhat dot com>
- Cc: libc-locales at sources dot redhat dot com
- Date: Sat, 15 May 2004 10:43:50 +0200
- Subject: Correct glibc locale hr_HR?
Hello
I'm checking out old GNU libc locale bug reports, and came across a
bug report against the hr_HR locale. You are listed as the original
author of this locale, so I want to check the error report with you.
(What is your current mail address, by the way? I found two, and am
not sure which one is correct. I send to both.)
I use this test program to check the currency formatting:
#include <stdio.h>
#include <locale.h>
#include <monetary.h>
int main (int argc, char *argv[])
{
char s[200];
setlocale (LC_MONETARY, "hr_HR");
strfmon (s, 200, "%n", 1234.45);
printf("'%s'\n", s);
strfmon (s, 200, "%n", -1234.45);
printf("'%s'\n", s);
strfmon (s, 200, "%i", 1234.45);
printf("'%s'\n", s);
strfmon (s, 200, "%i", -1234.45);
printf("'%s'\n", s);
}
With the current locale, it prints this output:
'Kn 1 234,45'
'-Kn 1 234,45'
'HRK 1 234,45'
'-HRK 1 234,45'
Is this the correct output? The report I saw, claimed that the output
should look like this instead:
'1 234,56 Kn'
'-1 234,56 Kn'
'HRK 1 1234,56'
'-HRK 1 234,56'
If the current format is wrong, please report a bug into the glibc
bugzilla, with examples of the correct formats (or a patch to fix the
locale).