Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[3.15] gh-156713: Use the filesystem encoding in nturl2path (GH-156717) - #157423

Open
miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-01599e2-3.15
Open

[3.15] gh-156713: Use the filesystem encoding in nturl2path (GH-156717)#157423
miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-01599e2-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

urllib.request.pathname2url() and url2pathname() use the filesystem encoding
and error handler since gh-85168, but nturl2path, which implements them on
Windows before 3.14, was left unchanged. Paths containing surrogate
characters raised UnicodeEncodeError.
(cherry picked from commit 01599e2)

Co-authored-by: Serhiy Storchaka [email protected]

…156717)

urllib.request.pathname2url() and url2pathname() use the filesystem encoding
and error handler since pythongh-85168, but nturl2path, which implements them on
Windows before 3.14, was left unchanged.  Paths containing surrogate
characters raised UnicodeEncodeError.
(cherry picked from commit 01599e2)

Co-authored-by: Serhiy Storchaka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants