Skip to content

[3.9] bpo-35883: Py_DecodeLocale() escapes invalid Unicode characters (GH-24843) - #24905

Merged
miss-islington merged 1 commit into
python:3.9from
miss-islington:backport-9976834-3.9
Mar 17, 2021
Merged

miss-islington merged 1 commit into
python:3.9from
miss-islington:backport-9976834-3.9

Conversation

@miss-islington

@miss-islington miss-islington commented Mar 17, 2021 •

Copy link
Copy Markdown
Contributor

Python no longer fails at startup with a fatal error if a command
line argument contains an invalid Unicode character.

The Py_DecodeLocale() function now escapes byte sequences which would
be decoded as Unicode characters outside the [U+0000; U+10ffff]
range.

Use MAX_UNICODE constant in unicodeobject.c.
(cherry picked from commit 9976834)

Co-authored-by: Victor Stinner vstinner@python.org

https://bugs.python.org/issue35883

…onGH-24843)

Python no longer fails at startup with a fatal error if a command
line argument contains an invalid Unicode character.

The Py_DecodeLocale() function now escapes byte sequences which would
be decoded as Unicode characters outside the [U+0000; U+10ffff]
range.

Use MAX_UNICODE constant in unicodeobject.c.
(cherry picked from commit 9976834)

Co-authored-by: Victor Stinner <vstinner@python.org>
@miss-islington

Copy link
Copy Markdown
Contributor Author

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

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, good bot.

@miss-islington

Copy link
Copy Markdown
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants