[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: error with locales in glibc 2.2



>>>>> In <[🔎] 80d7dkrfhc.fsf@junk.nocrew.org> 
>>>>>	Tomas Berndtsson <tomas@nocrew.org> wrote:
>> 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.

 Please check /etc/locale.gen, perhaps your sv_SE, en_GB (and so on)
is comented out in yours.

 Uncoment these and run /usr/sbin/locale-gen

-- 
ISHIKAWA Mutsumi
 <ishikawa@linux.or.jp>, <ishikawa@debian.org>, <ishikawa@redhat.com>



Reply to: