trouble with locale.h

Started by jfgames85, February 15, 2015, 09:58:33 PM

Previous topic - Next topic

jfgames85

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?

frankie

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, ...)
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

linuxdesk

Try to use setlocale(LC_ALL, "RU"); instead of setlocale(LC_ALL, "rus");