File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 1
1
@ echo off
2
2
3
- rem This file is UTF-8 encoded, so we need to update the current code page while executing it.
4
- for /f %%a in ('%~dp0 python.exe -Ic " import ctypes; print(ctypes.windll.kernel32.GetConsoleOutputCP())" ') do (set " _OLD_CODEPAGE=%%a " )
5
-
3
+ 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 (
5
+ set " _OLD_CODEPAGE = %%a "
6
+ )
6
7
if defined _OLD_CODEPAGE (
7
- %~dp0 python.exe -Ic " import ctypes; ctypes.windll.kernel32.SetConsoleOutputCP( 65001) "
8
+ " %SystemRoot% \System32\chcp.com " 65001 > nul
8
9
)
9
10
10
11
set " VIRTUAL_ENV = __VENV_DIR__"
@@ -39,6 +40,6 @@ set "PATH=%VIRTUAL_ENV%\__VENV_BIN_NAME__;%PATH%"
39
40
40
41
:END
41
42
if defined _OLD_CODEPAGE (
42
- %~dp0 python.exe -Ic " import ctypes; ctypes.windll.kernel32.SetConsoleOutputCP( %_OLD_CODEPAGE% ) "
43
+ " %SystemRoot% \System32\chcp.com " %_OLD_CODEPAGE% > nul
43
44
set " _OLD_CODEPAGE = "
44
45
)
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments