How to test locale in C? All my tests fail.

2007-05-24 Thread Artem Kuchin
Maybe it is the wrong list, but maybe someone can quickly help me out. I have a very stupid problem. I cannot convert to upper or lower case using manually set locale (setlocale(..)). A very simple program: #include locale.h #include errno.h #include ctype.h main(){ char

Re: How to test locale in C? All my tests fail.

2007-05-24 Thread Massimo Fusaro
From the setlocale(3) manual page: ... A locale argument of NULL causes setlocale() to return the current locale. ... -- -max 2007/5/24, Artem Kuchin [EMAIL PROTECTED]: Maybe it is the wrong list, but maybe someone can quickly help me out. I have a very stupid problem. I cannot

Re: How to test locale in C? All my tests fail.

2007-05-24 Thread Artem Kuchin
Massimo Fusaro wrote: From the setlocale(3) manual page: ... A locale argument of NULL causes setlocale() to return the current locale. ... Right. that why i first call setlocale(LC_CTYPE, ru_RU.CP1251); to set locale and the call setlocale(LC_CTYPE,NULL); to check what locale is

Re: How to test locale in C? All my tests fail.

2007-05-24 Thread Oliver Fromme
Artem Kuchin wrote: I have a very stupid problem. I cannot convert to upper or lower case using manually set locale (setlocale(..)). A very simple program: [...] printf(IS UPPER ?: %d\n,isupper('?')); printf(IS UPPER ?: %d\n,isupper('?')); printf(IS LOWER

Re: How to test locale in C? All my tests fail.

2007-05-24 Thread Artem Kuchin
Oliver Fromme wrote: Artem Kuchin wrote: I have a very stupid problem. I cannot convert to upper or lower case using manually set locale (setlocale(..)). A very simple program: [...] printf(IS UPPER ?: %d\n,isupper('?')); printf(IS UPPER ?: %d\n,isupper('?')); printf(IS