]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: clarify the printable characters output by od
authorPádraig Brady <P@draigBrady.com>
Fri, 22 Mar 2013 15:33:57 +0000 (15:33 +0000)
committerPádraig Brady <P@draigBrady.com>
Fri, 22 Mar 2013 16:18:45 +0000 (16:18 +0000)
* src/od.c (usage): Mention any printable character is output,
Not just ASCII.
* doc/coreutils.texi (od invocation): Further clarify that only
single byte characters are output (due to the alignment requirement).
Also mention the fact that 3 digit octal sequences are output
for non printable characters without a corresponding C escape.
Reported in http://bugs.gnu.org/13947

doc/coreutils.texi
src/od.c

index 8f1df4525e148f20189548e50d45c215dd50fd2d..dfa9b1c21e45425a966799a95197e64d7a218379 100644 (file)
@@ -1908,14 +1908,15 @@ of each output line using each of the data types that you specified,
 in the order that you specified.
 
 Adding a trailing ``z'' to any type specification appends a display
-of the ASCII character representation of the printable characters
+of the single byte character representation of the printable characters
 to the output line generated by the type specification.
 
 @table @samp
 @item a
 named character, ignoring high-order bit
 @item c
-ASCII character or backslash escape,
+printable single byte character, C backslash escape
+or a 3 digit octal sequence
 @item d
 signed decimal
 @item f
@@ -2003,8 +2004,8 @@ Output as octal bytes.  Equivalent to @samp{-t o1}.
 
 @item -c
 @opindex -c
-Output as ASCII characters or backslash escapes.  Equivalent to
-@samp{-t c}.
+Output as printable single byte characters, C backslash escapes
+or 3 digit octal sequences.  Equivalent to @samp{-t c}.
 
 @item -d
 @opindex -d
index e7d881b28ec2d0ed33e3061aca6a132c3d58c46a..e8cab46ab6b4960d92206f082e5e9fd6140def90 100644 (file)
--- a/src/od.c
+++ b/src/od.c
@@ -339,7 +339,7 @@ suffixes may be . for octal and b for multiply by 512.\n\
 Traditional format specifications may be intermixed; they accumulate:\n\
   -a   same as -t a,  select named characters, ignoring high-order bit\n\
   -b   same as -t o1, select octal bytes\n\
-  -c   same as -t c,  select ASCII characters or backslash escapes\n\
+  -c   same as -t c,  select printable characters or backslash escapes\n\
   -d   same as -t u2, select unsigned decimal 2-byte units\n\
 "), stdout);
       fputs (_("\
@@ -355,7 +355,7 @@ Traditional format specifications may be intermixed; they accumulate:\n\
 \n\
 TYPE is made up of one or more of these specifications:\n\
   a          named character, ignoring high-order bit\n\
-  c          ASCII character or backslash escape\n\
+  c          printable character or backslash escape\n\
 "), stdout);
       fputs (_("\
   d[SIZE]    signed decimal, SIZE bytes per integer\n\