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

Feature request: Change default decoded text encoding to ASCII #323

Closed
SonOfLilit opened this issue Dec 7, 2021 · 3 comments
Closed

Feature request: Change default decoded text encoding to ASCII #323

SonOfLilit opened this issue Dec 7, 2021 · 3 comments

Comments

@SonOfLilit
Copy link

The "decoded text" window is used mostly to make plaintext sections in binary files easy to spot.

By using (I think?) latin1 as the encoding, it is much harder to distinguish at a glance between noise that includes happens to include a lot of characters that look like text (many values >127 happen to look like characters in latin1).

Many have asked already to add an option to switch encoding to e.g. UTF8, Shift-JIS or whatever they happen to need. My request is that the default be set not to latin1 but to ascii, the encoding used by most hex editors and for good reason (with all non-printable characters displayed as dots, perhaps in a different color to distinguish from real dot characters).

@lramos15
Copy link
Member

lramos15 commented Mar 2, 2022

We currently just use String.fromCharCode which doesn't really have an encoding but instead returns the unicode character see https://unicode-table.com/en/.

We considers 0-32, 127-161, 173-174, and 256+ as unprintable.

@SonOfLilit
Copy link
Author

Will you accept a pull request that considers all >127 as unprintable?

@lramos15
Copy link
Member

lramos15 commented Mar 2, 2022

I reviewed the other allowed characters and I understand where you're coming from. I went ahead and pushed it so printable characters are in the range [32, 127). We still display the UTF-8 and UTF-16 representations in the data inspector.

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

No branches or pull requests

2 participants