www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/01/21/06:10:41

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.1 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Date: Wed, 21 Jan 2009 03:10:28 -0800 (PST)
From: Alexey Lyubimov <alexeipobox AT yahoo DOT com>
Reply-To: alexeipobox AT yahoo DOT com
Subject: 1.5.25-15, gcc 3.4.4-3: printf() does not print cyrillic (russian) text in Windows encoding
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
Message-ID: <690572.44106.qm@web33201.mail.mud.yahoo.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id n0LBAeCJ002790

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/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019