X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=1.3 required=5.0	tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
X-Rocket-MIMEInfo: 001.001,Ck9uIDEwLzkvMjAxMiA3OjI1IFBNLCBPbHVtaWRlIHdyb3RlOgo.IFdoZW4gSSBydW4gb2N0YWwgZHVtcCAob2QpIEkgbm90aWNlIHRoYXQgZXh0ZW5kZWQgQVNDSUkgY2hhcmFjdGVycyBhcmUKPiBkaXNwbGF5ZWQgaW5jb3JyZWN0bHkgYXMgb3JkaW5hcnkgY2hhcmFjdGVycy4gRm9yIGV4YW1wbGUsIHRoZSBleHRlbmRlZAo.IGNoYXJhY3RlcnMgMTkxLCAxOTYsIGFuZCAyMTggYXJlIGRpc3BsYXllZCBhcyAnPycgLCAnRCcgYW5kICdaJwo.IHJlc3BlY3RpdmVseS4gSSB0aG91Z2h0IG9kIHdhcyAnYW5kaW4BMAEBAQE-
References: <50745E1D.5020208@web.de> <50747B16.8000209@gmail.com>
Message-ID: <1349868428.7869.YahooMailNeo@web171404.mail.ir2.yahoo.com>
Date: Wed, 10 Oct 2012 12:27:08 +0100 (BST)
From: GrahamC <grahamc001uk@yahoo.co.uk>
Reply-To: GrahamC <grahamc001uk@yahoo.co.uk>
Subject: Re: Displaying extended ASCII characters in output of octal dump as hexadecimal
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
In-Reply-To: <50747B16.8000209@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q9ABRQ4g004637


On 10/9/2012 7:25 PM, Olumide wrote:
> When I run octal dump (od) I notice that extended ASCII characters are
> displayed incorrectly as ordinary characters. For example, the extended
> characters 191, 196, and 218 are displayed as '?' , 'D' and 'Z'
> respectively. I thought od was 'anding' the each character with 127, but
> I've been informed that this because my shell/terminal is not configured
> to display non-ASCII characters.
>
> How can I configure Cygwin to display extended characters as in
> hexadecimal format?
>
> Thanks
>
> - Olumide
>

You can specify od -t a -t x1 if you don't mind 2 lines of output for every 16 bytes of data (one line for ascii, another line for hex).

Alternatively write a python script for hex/octal dumping and use the unichr() function for byte values in the 128..255 range.

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


