Public bug reported:

Output hex codes for 12 and 255, then convert it to binary, and dump
these using hexdump's '_u' conversion string, (_u means output US ASCII
characters):

    printf '%.2x\n' 12 255 | xxd -r -p | hexdump  -v   -e '/1 "
_%_u\_\n"'

Output:

     _ff_
     _ff_

Expected result would be two different strings, (maybe "FF" for the
first one?), or failing that, to document this ambiguity in 'man
hexdump'.

Note that some format strings like '_p' are quite non-specific, and
output all non-printing chars as a '.', and that's to be expected.  But
for '_u' this is not expected, and the above is the only instance of
ambiguous output, as shown by:

    printf '%.2x\n' {0..255} | xxd -r -p | \
    hexdump  -v   -e '/1 " _%_u\_\n"' | \
    sort | uniq -c | sort -nr | head -2

Output (i.e. the only duplicate is 'ff'):

      2  _ff_
      1  _Z_

Hope this helps...

** Affects: bsdmainutils (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1842908

Title:
  hexdump `_u` conversion outputs ambiguous string.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bsdmainutils/+bug/1842908/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to