www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/12/08/07:57:42

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_SUB_ENC_UTF8
X-Spam-Check-By: sourceware.org
Message-ID: <4B1E4D22.9020406@hones.org.uk>
Date: Tue, 08 Dec 2009 12:57:06 +0000
From: Cliff Hones <cliff AT hones DOT org DOT uk>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: UTF-8 in Cygwin console on 1.7
X-Spam-Score: -2.6 (--) (knockando.watchfront.net.uk)
X-Spam-Report: knockando.watchfront.net.uk has scanned this email for spam. Results:- BAYES_00=-2.599 (total -2.6, current threshold 4.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

Is UTF-8 character output fully supported in the standard Cygwin
console ($TERM=cygwin) under Cygwin 1.7?

On my XP Pro SP3, in a standard Cygwin console (eg as provided by
the default cygwin.bat startup), keyboard input of multi-byte
characters appears correct - eg £ (UK pound) inputs the
UTF-8 sequence C2 A3, and € (euro) inputs E2 82 AC.  However,
on output while C2 A3 correctly displays UK pound, E2 82 AC
displays a question mark.

For example:

  /bin/echo -e \\0302\\0243          # displays UK pound
  /bin/echo -e \\0342\\0202\\0254    # displays ? - not euro

Under mintty, both the above work correctly (ie euro is displayed).

There also appears to be a problem with the NUL character - this
should be completely ignored on output, but is instead displayed
as a space:

  /bin/echo -e A\\0000B              # displays A B, should be AB

Again, with mintty the display is correct.

Is this intended behaviour (I assume not, as 1.7 user guide does
say UTF-8 is supported in console window), is there a problem with
UTF-8 on cygwin console, or is my system somehow misconfigured?

[I was rather surprised to discover that non-X rxvt does not handle
UTF-8 output at all, not that this causes me any great concern.]

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