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

Save unicode decoder state (fixes #38) #39

Merged
merged 3 commits into from
Feb 27, 2020

Conversation

Count-Count
Copy link
Contributor

Save the decoder in an instance attribute so its state is save for the next iterator call.

Test cases.

Otherwise replacement characters are inserted if self.buf ends within an
incomplete multi-byte UTF-8 sequence.
Copy link
Contributor

@xqt xqt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@xqt xqt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preleading "u" can be omitted for literals due to unicode_literals Import on top of this file

@Count-Count
Copy link
Contributor Author

Preleading "u" can be omitted for literals due to unicode_literals Import on top of this file
Done with 2ce26fe.

@TheSandDoctor
Copy link
Collaborator

@btubbs could you please take a look at this? Thanks!

@btubbs
Copy link
Owner

btubbs commented Feb 27, 2020

Thank you!

@btubbs btubbs merged commit c85c6f2 into btubbs:master Feb 27, 2020
@TheSandDoctor
Copy link
Collaborator

Thanks @btubbs ! I keep running into this issue with a bot of mine, so am really happy it was merged :)

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.

4 participants