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

Use "backslashreplace" for encoding errors #70

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ryan-shaw
Copy link

@ryan-shaw ryan-shaw commented Jul 1, 2023

When encountering bytes that are not of the expected encoding the file read throws an exception and stops reading completely.

This commit will replace the bytes with an escaped sequence.

More info: https://docs.python.org/3/library/io.html#io.TextIOWrapper

When encountering bytes that are not of the expected format the file read throws an exception and stops reading completely. 

This commit will replace the bytes with an escaped sequence.

More info: https://docs.python.org/3/library/io.html#io.TextIOWrapper
@bgreenlee
Copy link
Owner

Good catch. Would it be possible to add a test case for this?

@ryan-shaw
Copy link
Author

Will do

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.

2 participants