NO

Author Topic: trouble with locale.h  (Read 2793 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: 2096
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, ...)
It is better to be hated for what you are than to be loved for what you are not. - Andre Gide

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");