delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/06/26/14:01:36

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.8 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: <4A44FC98.2050500@aim.com>
References: <4A44FC98 DOT 2050500 AT aim DOT com>
Date: Fri, 26 Jun 2009 14:01:17 -0400
Message-ID: <f60fe000906261101x33336d06m1907e54f0331968d@mail.gmail.com>
Subject: Re: Problem with displaying ASCII table in mintty
From: "Mark J. Reed" <markjreed 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

On Fri, Jun 26, 2009 at 12:51 PM, Mark Harig wrote:
> Do you have any recommendations about what the utility program /usr/bin/ascii
> (in the package 'cygutils') should do?

Since the Cygwin version of ascii doesn't appear to have a man page,
I'm not sure what it "should" do.  What it appears to do is simply
printout out all possible 8-bit characters so you can see what they
are.  Which will fail in any multibyte locale.

You can write your own imitation ascii as a Perl one-liner:

perl -e 'for ($i=0;$i<256;$i+=4) { for ($i..$i+3) {  printf "%03d
0x%02x  %c\t", ($_)x3 } print "\n"; }'

which can be adjusted for different locale settings:

perl -Mencoding=utf8 -e '...'


adding the control-sequence support (^x) is left as an exercise for
the reader. :)

-- 
Mark J. Reed <markjreed AT gmail DOT com>

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