Skip to content

Commit 6955d44

Browse files
LorenzMendemiss-islington
authored andcommitted
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
1 parent 2fb2bc8 commit 6955d44

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Lib/venv/scripts/nt/activate.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@echo off
22

33
rem This file is UTF-8 encoded, so we need to update the current code page while executing it
4-
for /f "tokens=2 delims=:" %%a in ('"%SystemRoot%\System32\chcp.com"') do (
4+
for /f "tokens=2 delims=:." %%a in ('"%SystemRoot%\System32\chcp.com"') do (
55
set "_OLD_CODEPAGE=%%a"
66
)
77
if defined _OLD_CODEPAGE (
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fixed activate.bat to correctly update codepage when chcp.com returns dots in output.
2+
Patch by Lorenz Mende.

0 commit comments

Comments
 (0)