From 6955d44b41058e3bcc59ff41860bd4cc8948c441 Mon Sep 17 00:00:00 2001 From: Lorenz Mende Date: Wed, 10 Apr 2019 19:19:16 +0200 Subject: [PATCH] bpo-34144: Fix of venv acvtivate.bat for win 10 (GH-8321) 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 | 2 +- .../next/Windows/2019-04-10-04-35-31.bpo-34144._KzB5z.rst | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Windows/2019-04-10-04-35-31.bpo-34144._KzB5z.rst diff --git a/Lib/venv/scripts/nt/activate.bat b/Lib/venv/scripts/nt/activate.bat index 126049f495f..da831bb42c7 100644 --- a/Lib/venv/scripts/nt/activate.bat +++ b/Lib/venv/scripts/nt/activate.bat @@ -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 index 00000000000..7b8ca821b40 --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2019-04-10-04-35-31.bpo-34144._KzB5z.rst @@ -0,0 +1,2 @@ +Fixed activate.bat to correctly update codepage when chcp.com returns dots in output. +Patch by Lorenz Mende.