| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…` URIs Adjust `urllib.request.url2pathname()` and `pathname2url()` to use the filesystem encoding when quoting and unquoting file URIs, rather than forcing use of UTF-8. No changes are needed in the `nturl2path` module because Windows always uses UTF-8, per PEP 529.
|
The freedesktop file URI spec is a useful reference here:
Also:
|
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM in general. But we should support URIs containing not quoted non-ASCII characters.
Sorry, something went wrong.
|
Thanks for the review - I've made the changes you suggested |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM.
You can also use fsdecode(TESTFN_UNDECODABLE) and TESTFN_UNENCODABLE in some tests if you wish.
Sorry, something went wrong.
|
Thanks @barneygale for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
Sorry, something went wrong.
…` URIs (pythonGH-126852) Adjust `urllib.request.url2pathname()` and `pathname2url()` to use the filesystem encoding when quoting and unquoting file URIs, rather than forcing use of UTF-8. No changes are needed in the `nturl2path` module because Windows always uses UTF-8, per PEP 529. (cherry picked from commit c9b399f) Co-authored-by: Barney Gale <barney.gale@gmail.com>
…` URIs (pythonGH-126852) Adjust `urllib.request.url2pathname()` and `pathname2url()` to use the filesystem encoding when quoting and unquoting file URIs, rather than forcing use of UTF-8. No changes are needed in the `nturl2path` module because Windows always uses UTF-8, per PEP 529. (cherry picked from commit c9b399f) Co-authored-by: Barney Gale <barney.gale@gmail.com>
|
GH-127039 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
|
GH-127040 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
…e` URIs (GH-126852) (#127040) GH-85168: Use filesystem encoding when converting to/from `file` URIs (GH-126852) Adjust `urllib.request.url2pathname()` and `pathname2url()` to use the filesystem encoding when quoting and unquoting file URIs, rather than forcing use of UTF-8. No changes are needed in the `nturl2path` module because Windows always uses UTF-8, per PEP 529. (cherry picked from commit c9b399f) Co-authored-by: Barney Gale <barney.gale@gmail.com>
…e` URIs (GH-126852) (#127039) GH-85168: Use filesystem encoding when converting to/from `file` URIs (GH-126852) Adjust `urllib.request.url2pathname()` and `pathname2url()` to use the filesystem encoding when quoting and unquoting file URIs, rather than forcing use of UTF-8. No changes are needed in the `nturl2path` module because Windows always uses UTF-8, per PEP 529. (cherry picked from commit c9b399f) Co-authored-by: Barney Gale <barney.gale@gmail.com>
…` URIs (python#126852) Adjust `urllib.request.url2pathname()` and `pathname2url()` to use the filesystem encoding when quoting and unquoting file URIs, rather than forcing use of UTF-8. No changes are needed in the `nturl2path` module because Windows always uses UTF-8, per PEP 529.
|
UTF-8 can fail on surrogates. See #156610. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Adjust urllib.request.url2pathname() and pathname2url() to use the filesystem encoding when quoting and unquoting file URIs, rather than forcing use of UTF-8.
No changes are needed in the nturl2path module because Windows always uses UTF-8, per PEP 529.