delorie.com/archives/browse.cgi | search |
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: | <4A442339.8060406@aim.com> |
References: | <4A442339 DOT 8060406 AT aim DOT com> |
Date: | Fri, 26 Jun 2009 07:23:07 +0100 |
Message-ID: | <416096c60906252323j4c101ca6jc051c47b072796b6@mail.gmail.com> |
Subject: | Re: Problem with displaying ASCII table in mintty |
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/6/26 Mark Harig > > Is is possible to display the upper 128 entries in the ASCII > table in mintty using the 'cygutils' application 'ascii'? > > I have attempted to use two configurations, but neither one > displays the table without problems in mintty: > > Configuration 1: > > =C2=A0 - mintty: Using the font's codepage set to UTF-8 > > =C2=A0 =C2=A0 bash-3.2$ /usr/bin/grep Codepage ~/.minttyrc > =C2=A0 =C2=A0 Codepage=3DUTF-8 > > =C2=A0 - bash: > =C2=A0 =C2=A0 bash-3.2$ echo $TERM > =C2=A0 =C2=A0 xterm > > =C2=A0 =C2=A0bash-3.2$ echo \"$LANG\" ":" \"$LC_ALL\" ":" \"$LC_CTYPE\" > =C2=A0 =C2=A0 "en_US.UTF-8" : "en_US.UTF-8" : "en_US.UTF-8" > > =C2=A0With this configuration, the upper 128 entries to the ASCII > =C2=A0table are displayed as follows (the #'s are replacements for > =C2=A0the gray box character that is displayed): That's because because bytes from 0x80 to 0xFF by themselves are invalid in UTF-8. Those codepoints need to be encoded as two-byte sequences. I'd suspect /bin/ascii isn't designed for that. Configuration 2: > > =C2=A0 - mintty: Using the font's codepage set to ISO-8859-1 > > =C2=A0 =C2=A0 bash-3.2$ /usr/bin/grep -i codepage ~/.minttyrc > =C2=A0 =C2=A0 Codepage=3DISO-8859-1:1998 (Latin-1, West Europe) > > =C2=A0- bash: > > =C2=A0 =C2=A0bash-3.2$ echo \"$LANG\" ":" \"$LC_ALL\" ":" \"$LC_CTYPE\" > =C2=A0 =C2=A0"en_US.ISO-8859-1" : "en_US.ISO-8859-1" : "en_US.ISO-8859-1" > > =C2=A0With this second configuration, most of the upper 128 entries > =C2=A0of the ASCII table are displayed, but many are missing. What's missing are the characters from 0x80 to 0x9F, aka the C1 control character set in the ISO codepages. Windows codepages have printable characters in their place. > =C2=A0In addition, > =C2=A0many entries are displayed in the wrong location (some rows are out > =C2=A0of order). That's because some of the C1 control characters are interpreted specially, in particular CSI and OSC. It's the same if you try it in xterm. You can get most of the printable characters in the C1 range by switching to Windows codepage 1252. (Well, you could anyway if it wasn't for a rather bad bug in mintty-0.4.0 and 0.4.1 that means that ISO-8859-1 is used no matter your codepage setting. That's fixed on the 0.4 SVN branch.) 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |