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

Refactor decoding format, escape unconvertable #325

Merged
merged 1 commit into from
Nov 29, 2024
Merged

Refactor decoding format, escape unconvertable #325

merged 1 commit into from
Nov 29, 2024

Conversation

AustinMroz
Copy link
Collaborator

I've had underlying concern for a while now that universally using utf-8 isn't correct because it doesn't respect locale and this serves as fairly strong confirmation. From a little bit of digging, checking seems as simple as calling locale.getencoding(), but the documentation claims that this is ANSI for windows (meaning changing it would affect the majority of users). As a result, I've refactored out all the string decoding to use a common variable and set it to display an escaped version of any unconvertable characters, but am leaving the format as utf-8 until I have further information.

See #324

I've had underlying concern for a while now that universally using utf-8
isn't correct because it doesn't respect locale and this serves as
fairly strong confirmation. From a little bit of digging, checking seems
as simple as calling `locale.getencoding()`, but the documentation
claims that this is ANSI for windows (meaning changing it would affect
the majority of users). As a result, I've refactored out all the string
decoding to use a common variable and set it to display an escaped
version of any unconvertable characters, but am leaving the format as
utf-8 until I have further information.

See #324
@AustinMroz AustinMroz merged commit b0f9796 into main Nov 29, 2024
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 this pull request may close these issues.

1 participant