| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| 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 |
| From: | "Hannu E K Nevalainen" <garbage_collector AT telia DOT com> |
| To: | "ML CygWIN" <cygwin AT cygwin DOT com> |
| Subject: | OT: Beeing 'endian' (RE: Unable to open files including Korean names) |
| Date: | Tue, 15 Jun 2004 21:16:33 +0200 |
| Message-ID: | <NGBBLLIAMFLGJEOAJCCEMEHODLAA.garbage_collector@telia.com> |
| MIME-Version: | 1.0 |
| In-Reply-To: | <20040615141718.GD5948@sab.mazic.org> |
> From: Jaeho Shin
> Sent: Tuesday, June 15, 2004 4:17 PM
> Looks like od's output is in little-endian. This identifies them as
> U+D55C and U+AE00, `echo -n XX | iconv -f euc-kr -t ucs-2 | od -x -`:
> 0000000 5cd5 00ae
A better way to explore things is by bypassing the endianness with
$ ... | od -t x1z
As soon as there is more than 8 bits bunched together,
you'll find the end(ian) <grin?>.
Another way might be something like this:
$ type -a od
od is a function
od ()
{
odargs="$@";
if [ -z "$odargs" ] || [ -f "$odargs" ]; then
odargs="-A x -w24 -t x1z $odargs";
fi;
command od $odargs;
unset odargs
}
od is /usr/bin/od
od is /bin/od
( -w24 above <=> $(echo $COLUMNS) = 112
/Hannu E K Nevalainen, B.Sc. EE - 59+16.37'N, 17+12.60'E --76-->
--
inline short isLittleEndian(void) {
const short testvalue=1;
char *p=(char *) & testvalue;
return (short)(*p!=0);
}
--
--END OF MESSAGE-- << File: ATT00010.dat >>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |