error with locales in glibc 2.2
bugs.debian.org seems to be down, so I couldn't see if this has been
reported as a bug yet. Locales in glibc 2.2 doesn't seem to work
properly. I have this small test program:
------
#include <stdio.h>
#include <locale.h>
int main(int argc, char *argv[])
{
char *locale_set;
locale_set = setlocale(LC_COLLATE, "");
printf("locale set: %s\n", locale_set);
return 0;
}
------
Running it, with a few different values on LANG gives:
tomas@penne:~/src$ ./localetest
locale set: C
tomas@penne:~/src$ LANG=en_US ./localetest
locale set: en_US
tomas@penne:~/src$ LANG=sv_SE ./localetest
locale set: (null)
tomas@penne:~/src$ LANG=en_GB ./localetest
locale set: (null)
I've tested a few more, but so far, I have only been able to find the
default "C" and "en_US" to work.
This is for:
ii locales 2.2.1-1 GNU C Library: National Language (locale) da
ii libc6 2.2.1-1 GNU C Library: Shared libraries and Timezone
Same thing with 2.2-11 on my Sparc.
It works as it should with libc6 2.1.3-10.
I have the /usr/share/i18n/locales/sv_SE from the locales package, but
I'm no expert on locales, so I don't know if there might be an error
in it (along with a lot of others, except en_US).
Have I missed something in the use of locales? Do I need any other
packages installed?
Greetings,
Tomas
Reply to: