Subject: Re: bug#13947: bug report for core-utils command : OD

From: Mark JAEGER <[email-masked]>
Date: Wed, 27 Mar 2013 11:39:08 -0700 (PDT)

Hello Eric,

The terms "single-byte character" and "single-byte
printable character" do not sound precise to me.

A byte is just a byte.  It is NOT a character.
I.e., it is an octet, or an 8-bit quantity.

It CAN be interpreted as a character, but only in
the context of a particular ENCODING.

The help text as it stands now IS precise in talking
about ASCII, which IS a particular encoding.

Please don't use the term "single-byte ... character"
without being precise about what encoding it uses.

Regards,

--Mark JAEGER                  phone: 312-651-8329
Sustaining Engineering (formerly DDR)
Server Technologies, Oracle   e-mail: [email-masked]

On Fri, 22 Mar 2013, Eric Blake wrote:

> Date: Fri, 22 Mar 2013 10:03:47 -0600
> From: Eric Blake <[email-masked]>
> To: Pádraig Brady <[email-masked]>
> Cc: [email-masked], Marc Grondin <[email-masked]>,
>     [email-masked]
> Subject: Re: bug#13947: bug report for core-utils command :  OD
> 
> On 03/22/2013 09:45 AM, Pádraig Brady wrote:
>> Hopefully the attached clarifies things.
>
>> * 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).
>> Reported in http://bugs.gnu.org/13947
>
> Yes, this looks good to me.  It could go in as-is, but see my question
> below...
>
>> ---
>>  doc/coreutils.texi |    6 +++---
>>  src/od.c           |    4 ++--
>>  2 files changed, 5 insertions(+), 5 deletions(-)
>>
>
>>  @table @samp
>>  @item a
>>  named character, ignoring high-order bit
>>  @item c
>> -ASCII character or backslash escape,
>> +printable single byte character or backslash escape,
>
> Hmm, we output octal sequences without a backslash; should the info page
> be any more verbose that it is one of: a single-byte printable
> character, a C backslash escape, or an octal sequence?  Or does that
> just clutter things (seeing three octal digits, even without a
> backslash, still makes it easy to determine that it can be used as an
> escape sequence).
>
>> +++ 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\
>
> For the --help output, terse is good, so I don't see any improvements to
> your change here.
>
> -- 
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
>