[vim/vim] [xxd] Little-endian (-e) with 'weird' cols causes missing characters (Issue #12097)

27 views
Skip to first unread message

Aapo Rantalainen

unread,
Mar 2, 2023, 4:22:44 PM3/2/23
to vim/vim, Subscribed

Steps to reproduce

echo -n "ABCDEF" | xxd  -c6 -e
00000000: 44434241     4645CDEF

And

echo -n "ABCDEFGHI" | xxd  -c9 -e
00000000: 44434241 48474645     AB49EFGHI

Expected behaviour

I expected that using -e for little-endian will not cause missing characters.

Expected output:

00000000: 44434241     4645  ABCDEF

Or

00000000: 44434241 4645  ABCDEF

Version of Vim

From v7.4.652 to patch 9.0.1373

Environment

Ubuntu, not relating terminal/shell.

Logs and stack traces

No response


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12097@github.com>

Bram Moolenaar

unread,
Mar 5, 2023, 3:18:22 PM3/5/23
to vim/vim, Subscribed

Closed #12097 as completed via 4390d87.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/12097/issue_event/8668613372@github.com>

Aapo Rantalainen

unread,
Mar 8, 2023, 8:56:41 AM3/8/23
to vim/vim, Subscribed

-c3 still misses space

echo -n "ABCDEFGHI" | ./xxd  -c3 -e
00000000: 43  41 42ABC
00000003: 46  44 45DEF
00000006: 49  47 48GHI


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12097/1460191180@github.com>

Bram Moolenaar

unread,
Mar 8, 2023, 9:42:53 AM3/8/23
to vim/vim, Subscribed


> -c3 still misses space
>
> echo -n "ABCDEFGHI" | ./xxd -c3 -e
> 00000000: 43 41 42ABC
> 00000003: 46 44 45DEF
> 00000006: 49 47 48GHI

Little-endian only works properly with a multiple of four octets.
With three octets I would not know what to display.

--
If you're sending someone Styrofoam, what do you pack it in?

/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/12097/1460265471@github.com>

Reply all
Reply to author
Forward
0 new messages