bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

od -t a to warn for non-ASCII


From: Ed Avis
Subject: od -t a to warn for non-ASCII
Date: Tue, 31 Jan 2006 17:12:53 +0000 (GMT)

If you run 'od -t a' then the high bit is silently stripped out of the input. This can cause a bit of confusion (especially when dealing with char 160 (non-breaking space) in ISO-8859-1 which strips down to a regular space...)

I suggest that when 'od -t a' encounters the first high-bit-set character in the input it should print a warning that the bit is being ignored, and that if you have input files that might not be pure ASCII then 'od -t c' might be a better choice. This warning could be disabled when POSIXLY_CORRECT is set.

If you don't want to do that, please update the help text and info documentation to make it clear that the 'a' format maps high-bit-set characters onto the same output as ASCII, and so probably isn't what you want if you are trying to see what characters a byte stream contains.

--
Ed Avis <address@hidden>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]