diff options
author | samstagern <30337691+samstagern@users.noreply.github.com> | 2018-11-07 16:49:14 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2018-11-07 16:49:14 (GMT) |
commit | c64583b6d3e8516a8cd2b5f84fc1e300bfac2206 (patch) | |
tree | 933137ccfa6a61714da3a4d84c172252a7bdc6aa /Misc | |
parent | 637a33b99685fd5d1032670fbe29c7c8a8f0ff63 (diff) | |
download | cpython-c64583b6d3e8516a8cd2b5f84fc1e300bfac2206.zip cpython-c64583b6d3e8516a8cd2b5f84fc1e300bfac2206.tar.gz cpython-c64583b6d3e8516a8cd2b5f84fc1e300bfac2206.tar.bz2 |
bpo-32409: Fix regression in activate.bat on international Windows (GH-10295)
Handle Unicode contents on localised Windows systems when activating a
venv. activate.bat currently breaks on German Windows systems, as chcp.com does
not return a plain number as on English systems, but (arbitrarily) appends a dot at the end
(for example "Aktive Codepage: 850." instead of "Active Codepage: 850"). The
dependency to chcp.com is removed and ctypes is used to get, set and restore the
console output code page. The code page for console input is not changed.
We can't use __VENV_PYTHON__ to find python.exe, since it's UTF-8. cmd.exe decodes
the script using the console output code page.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2018-11-02-12-01-00.bpo-32409.MFRX2Q.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2018-11-02-12-01-00.bpo-32409.MFRX2Q.rst b/Misc/NEWS.d/next/Library/2018-11-02-12-01-00.bpo-32409.MFRX2Q.rst new file mode 100644 index 0000000..9b57c5b --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-11-02-12-01-00.bpo-32409.MFRX2Q.rst @@ -0,0 +1,2 @@ +Fixed implementation of :file:`activate.bat` to handle Unicode contents on +localized Windows systems (eg. German). Patch by Martin Bijl.
\ No newline at end of file |