Pelles C forum

C language => Beginner questions => Topic started by: jfgames85 on February 15, 2015, 09:58:33 PM

Title: trouble with locale.h
Post by: jfgames85 on February 15, 2015, 09:58:33 PM
Hi all.
I have a little trouble. I include locale.h, first line in main function I set setlocale(LC_ALL, "rus");
and when I try something output, for example printf("%s\n", "Русский текст");

it's not work with russian language... :(

PS, in MSVS Express all works fine, but i like pelles C.

Can you help me?
Title: Re: trouble with locale.h
Post by: frankie on February 15, 2015, 11:31:55 PM
This is a known problem with PellesC, its I/O functions are stdC and don't works as that of MS.  :(
If your computer is localized for russian try using wprintf instead of printf, and/or using console output (_cprintf, _cwprintf, ...)
Title: Re: trouble with locale.h
Post by: linuxdesk on March 14, 2016, 04:25:25 PM
Try to use setlocale(LC_ALL, "RU"); instead of setlocale(LC_ALL, "rus");