delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/07/27/06:02:57

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <814897.30194.qm@web45201.mail.sp1.yahoo.com>
References: <416096c60907270125u1c0037e0pc881b930cd2a021 AT mail DOT gmail DOT com> <814897 DOT 30194 DOT qm AT web45201 DOT mail DOT sp1 DOT yahoo DOT com>
Date: Mon, 27 Jul 2009 11:02:32 +0100
Message-ID: <416096c60907270302v72593b63t1455737796196fe3@mail.gmail.com>
Subject: Re: 1.5.25-15: Why my $INITRC "set convert-meta off" seems to fail?
From: Andy Koppe <andy DOT koppe AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

2009/7/27 Rodion Gorkovenko:
> You suppose this is windows, who responsible for this substitution? This thought had not visited my head... I thought substitution is performed by cygwin...

It's done by the Windows text rendering functions. It's fairly useful
actually as a fallback, because at least you end up with something
readable.


> As I wrote earlier, I preset proper codepage in windows console (by mode con cp select=1251 or 866 or 437 at last) - and when I am trying to view file, written in CP1251 by
>
> cp msg.txt con - then I view it all right,
> but with
> cp msg.txt /dev/tty - I view it as a sequence of "aaeieii?oeiaaaieieia"

Right. It would appear that /dev/tty assumes the text is in ISO-8859-1
or CP1252 and sends it to the console as such. But since the console
is set to 1251, Windows' substitution mechanism kicks in and replaces
anything that looks like an 'A' in 1252 with ASCII 'A', as that
displays correctly in 1251.

Possible solutions:
1. Change the system-wide non-Unicode codepage setting in the
Regional&Languages control panel.
2. Set the console codepage before invoking bash in cygwin.bat.
3. Use MinTTY and set the codepage you want on the "Text" page of its
options dialog.
4. Install Cygwin 1.7 and use the locale mechanism documented at
http://cygwin.com/1.7/cygwin-ug-net/setup-locale.html

Good luck,
Andy

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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