delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/07/26/07:47:34

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=1.4 required=5.0 tests=AWL,BAYES_50
X-Spam-Check-By: sourceware.org
Message-ID: <636720.19285.qm@web45216.mail.sp1.yahoo.com>
Date: Sun, 26 Jul 2009 04:47:18 -0700 (PDT)
From: Rodion Gorkovenko <rodiongork AT yahoo DOT com>
Subject: 1.5.25-15: Where are console translation rules hidden in cygwin?
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
X-IsSubscribed: yes
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

Hello Comrades! ;-)

[Cygwin 1.5.25-15 in Windows 2000 5.00.2195 english version]

I run bash in cmd.exe console window. I want to view text file, which contains text with CP-1251 codepage (windows Russian).

So before running Cygwin.bat I set necessary font with:

e:\prgs\usr\cygwin\> mode con cp select=1251

It is ok. Now I could read the file from the screen, for example, by

e:\prgs\usr\cygwin\> type test.txt

I start cygwin bash, and, going to directory containing file, ask system:

$cp test.txt con

Ok! I could read it still, in Russian, without problems.

But if I try:

$cp test.txt /dev/tty

Or run Midnight Commander and try to examine my file with internal viewer, I read it just as a sequence of letters "iiieiaoieao? iae?eaioioui".

I understand the problem. Console does not want to display characters with ascii-codes from 128 to 255 transparently. Instead it assumes these codes represent symbols in 437 codepage, which is international and contains easter europe letters (mainly vowels with accents for French and German etc. languages) - and shows me symbols from lower half of ascii-table which looks as closely to "original", as possible.

I could not find information, where this translation occurs and how could I change rules of these translation. I slightly know that linuxes deal with variants of UTF-8 transformation for console, but I do not know exactly is this the matter in my case, and how can I influence.

sincerely yours,
Rodion


      


--
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