diff options
author | Barney Gale <barney.gale@gmail.com> | 2024-11-19 21:19:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-19 21:19:30 (GMT) |
commit | c9b399fbdb01584dcfff0d7f6ad484644ff269c3 (patch) | |
tree | 4e7fe4fa8d106d35597ec8c2f969e7e58ba9517c /Misc | |
parent | 2cdfb41d0c3bfea37983fc872951bc3b2a4d90b8 (diff) | |
download | cpython-c9b399fbdb01584dcfff0d7f6ad484644ff269c3.zip cpython-c9b399fbdb01584dcfff0d7f6ad484644ff269c3.tar.gz cpython-c9b399fbdb01584dcfff0d7f6ad484644ff269c3.tar.bz2 |
GH-85168: Use filesystem encoding when converting to/from `file` URIs (#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.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2024-11-15-01-50-36.gh-issue-85168.bP8VIN.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2024-11-15-01-50-36.gh-issue-85168.bP8VIN.rst b/Misc/NEWS.d/next/Library/2024-11-15-01-50-36.gh-issue-85168.bP8VIN.rst new file mode 100644 index 0000000..abceda8 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-11-15-01-50-36.gh-issue-85168.bP8VIN.rst @@ -0,0 +1,4 @@ +Fix issue where :func:`urllib.request.url2pathname` and +:func:`~urllib.request.pathname2url` always used UTF-8 when quoting and +unquoting file URIs. They now use the :term:`filesystem encoding and error +handler`. |