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

[3.11] gh-96268: Fix loading invalid UTF-8 (GH-96270) #96668

Merged
merged 1 commit into from
Sep 7, 2022

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Sep 7, 2022

This makes tokenizer.c:valid_utf8 match stringlib/codecs.h:decode_utf8.

It also fixes an off-by-one error introduced in 3.10 for the line number when the tokenizer reports bad UTF8.
(cherry picked from commit 8bc356a)

Co-authored-by: Michael Droettboom mdboom@gmail.com

This makes tokenizer.c:valid_utf8 match stringlib/codecs.h:decode_utf8.

It also fixes an off-by-one error introduced in 3.10 for the line number when the tokenizer reports bad UTF8.
(cherry picked from commit 8bc356a)

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
@miss-islington
Copy link
Contributor Author

Status check is done, and it's a success ✅.

@miss-islington miss-islington merged commit ffafa9b into python:3.11 Sep 7, 2022
@miss-islington miss-islington deleted the backport-8bc356a-3.11 branch September 7, 2022 21:49
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.

None yet

4 participants