This is the mail archive of the
cygwin
mailing list for the Cygwin project.
1.5.25-15, gcc 3.4.4-3: printf() does not print cyrillic (russian) text in Windows encoding
- From: Alexey Lyubimov <alexeipobox at yahoo dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 21 Jan 2009 03:10:28 -0800 (PST)
- Subject: 1.5.25-15, gcc 3.4.4-3: printf() does not print cyrillic (russian) text in Windows encoding
- Reply-to: alexeipobox at yahoo dot com
Excuse me, if it is not correct mailing list to post this message (if so, please point me to the right one).
The problem is:
I'm trying to build small utility program written in plane "C" with gcc under Win98/Cygwin (since it should run under command.com I use "-mnocygwin").
Among other things my utility must print to the stdout short text string from a text file, generated by another program. This text is in Russian language and uses Windows encoding (1251). Here I get the problem: instead of normal Russian text I see on the screen absolutely wrong symbols! :-(
If I write the same text in the same encoding in a shell script (for example "echo ÐÑÐ ÑÑÑÑÐÐÐ ÑÐÐÑÑ") and run it under Cygwin - everything is Ok! But the C-program can not make the "right" output using printf().
May be somebody can give me an advice, how I can change the C-source in order to get the correct output. (To tell the truth I am not very familiar with all these locale things).
--
Thank you
Alexey Lyubimov
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/