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
Raw File
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
.gitattributes
# Binary data types
*.aif binary
*.aifc binary
*.aiff binary
*.au binary
*.bmp binary
*.exe binary
*.icns binary
*.gif binary
*.ico binary
*.jpg binary
*.pck binary
*.png binary
*.psd binary
*.tar binary
*.wav binary
*.whl binary
*.zip binary

# Specific binary files
Lib/test/sndhdrdata/sndhdr.* binary

# Text files that should not be subject to eol conversion
Lib/test/cjkencodings/* -text
Lib/test/decimaltestdata/*.decTest -text
Lib/test/test_email/data/*.txt -text
Lib/test/xmltestdata/* -text
Lib/test/coding20731.py -text
Lib/test/test_importlib/data01/* -text

# CRLF files
*.bat text eol=crlf
*.ps1 text eol=crlf
*.sln text eol=crlf
*.vcxproj* text eol=crlf
*.props text eol=crlf
*.proj text eol=crlf
PCbuild/readme.txt text eol=crlf
PC/readme.txt text eol=crlf

# Generated files
# https://github.com/github/linguist#generated-code
Include/graminit.h          linguist-generated=true
Python/graminit.h           linguist-generated=true
Modules/clinic/*.h          linguist-generated=true
Objects/clinic/*.h          linguist-generated=true
PC/clinic/*.h               linguist-generated=true
Python/clinic/*.h           linguist-generated=true
Python/importlib.h          linguist-generated=true
Python/importlib_external.h linguist-generated=true
Include/Python-ast.h        linguist-generated=true
Python/Python-ast.c         linguist-generated=true
Include/opcode.h            linguist-generated=true
Python/opcode_targets.h     linguist-generated=true
Objects/typeslots.inc       linguist-generated=true
Modules/unicodedata_db.h    linguist-generated=true
back to top