NO

Author Topic: trouble with locale.h  (Read 2278 times)

jfgames85

  • Guest
trouble with locale.h
« 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?

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 1888
Re: trouble with locale.h
« Reply #1 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, ...)

linuxdesk

  • Guest
Re: trouble with locale.h
« Reply #2 on: March 14, 2016, 04:25:25 pm »
Try to use setlocale(LC_ALL, "RU"); instead of setlocale(LC_ALL, "rus");