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

Re: setlocale doesn't change the language. Why?

Am Wed, 11 Mar 2015 21:16:20 +0500 schrieb Andrey Rahmatullin:

> On Wed, Mar 11, 2015 at 01:27:21PM +0000, Joerg Desch wrote:
>> Switch to 'en'
>> New LOCALE: 'C'
>> Hello World Switch to 'de'
>> New LOCALE: 'C'
>> Hello World
> So these cases are expected to you?

No. I expect the same output as shown by the other example. I expected 
that either "de_DE" or "de_DE.UTF8" should fit.

> You don't have 'de.utf8' locale on this system.

How can I check which locales are available?

> setlocale(3) has a return value which you should check if you are
> interested whether it succeeded.

Yes. So the example shows that neither of my calls to setlocale() result 
in the expected language. The big question is why? The sample works on my 
Desktop (Debian Wheezy) and in the chroot (Debian Squeeze) environment.

Reply to: