]> granicus.if.org Git - python/commitdiff
bpo-34144: Fix of venv acvtivate.bat for win 10 (GH-8321)
authorLorenz Mende <Lorenz.mende@gmail.com>
Wed, 10 Apr 2019 17:19:16 +0000 (19:19 +0200)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 10 Apr 2019 17:19:16 +0000 (10:19 -0700)
The script needs to be updated to support win 10/ 1803 chcp.com command (output has trailing dot)

https://bugs.python.org/issue34144

Lib/venv/scripts/nt/activate.bat
Misc/NEWS.d/next/Windows/2019-04-10-04-35-31.bpo-34144._KzB5z.rst [new file with mode: 0644]

index 126049f495fe3bd5ba9f97faf2c947a7fe23668e..da831bb42c79b2fce3dc1ebc98c2dd43400580db 100644 (file)
@@ -1,7 +1,7 @@
 @echo off
 
 rem This file is UTF-8 encoded, so we need to update the current code page while executing it
-for /f "tokens=2 delims=:" %%a in ('"%SystemRoot%\System32\chcp.com"') do (
+for /f "tokens=2 delims=:." %%a in ('"%SystemRoot%\System32\chcp.com"') do (
     set "_OLD_CODEPAGE=%%a"
 )
 if defined _OLD_CODEPAGE (
diff --git a/Misc/NEWS.d/next/Windows/2019-04-10-04-35-31.bpo-34144._KzB5z.rst b/Misc/NEWS.d/next/Windows/2019-04-10-04-35-31.bpo-34144._KzB5z.rst
new file mode 100644 (file)
index 0000000..7b8ca82
--- /dev/null
@@ -0,0 +1,2 @@
+Fixed activate.bat to correctly update codepage when chcp.com returns dots in output.\r
+Patch by Lorenz Mende.\r