https://github.com/python/cpython
Revision c64583b6d3e8516a8cd2b5f84fc1e300bfac2206 authored by samstagern on 07 November 2018, 16:49:14 UTC, committed by Vinay Sajip on 07 November 2018, 16:49:14 UTC
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.
1 parent 637a33b
History
Tip revision: c64583b6d3e8516a8cd2b5f84fc1e300bfac2206 authored by samstagern on 07 November 2018, 16:49:14 UTC
bpo-32409: Fix regression in activate.bat on international Windows (GH-10295)
Tip revision: c64583b
File Mode Size
.azure-pipelines
.github
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Programs
Python
Tools
m4
.gitattributes -rw-r--r-- 1.5 KB
.gitignore -rw-r--r-- 1.6 KB
.travis.yml -rw-r--r-- 7.6 KB
CODE_OF_CONDUCT.md -rw-r--r-- 609 bytes
LICENSE -rw-r--r-- 12.5 KB
Makefile.pre.in -rw-r--r-- 61.2 KB
README.rst -rw-r--r-- 10.0 KB
aclocal.m4 -rw-r--r-- 10.7 KB
config.guess -rwxr-xr-x 43.1 KB
config.sub -rwxr-xr-x 35.4 KB
configure -rwxr-xr-x 481.9 KB
configure.ac -rw-r--r-- 157.8 KB
install-sh -rwxr-xr-x 15.0 KB
pyconfig.h.in -rw-r--r-- 42.6 KB
setup.py -rw-r--r-- 98.8 KB

README.rst

back to top