Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to disable printing 0 bytes as ascii 0. #166

Closed
martinlindhe opened this issue Sep 17, 2022 · 1 comment
Closed

Add option to disable printing 0 bytes as ascii 0. #166

martinlindhe opened this issue Sep 17, 2022 · 1 comment

Comments

@martinlindhe
Copy link

martinlindhe commented Sep 17, 2022

Consider the following output

Capture

The right column present ASCII values of the hex column.

In the case of null bytes (value 0), they are printed as ascii 0 in the right column.

This is confusing to say the least. Consider for example the case of no color (it text after all. User will copy & paste it elsewhere):

Capture

As a comparison, here is xxd output, where they denote non-printable characters with a period instead:

Capture

I did not find any command line arguments to disable this.

I would like to request a mode of hexyl to print non-printable characters in a similar manner as xxd does it. Specifically I would like it to not insert printable ascii that does not belong in the ascii printout:

  • 0
  • _

  • And possibly more.
@sharkdp
Copy link
Owner

sharkdp commented Nov 13, 2022

Good point, thank you. See discussion in #169

@sharkdp sharkdp closed this as completed in 7d38f70 Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants