summaryrefslogtreecommitdiffstats
path: root/Telegram/build/prepare/prepare.py
diff options
context:
space:
mode:
authorIlya Fedin <fedin-ilja2010@ya.ru>2022-12-31 11:24:48 +0400
committerJohn Preston <johnprestonmail@gmail.com>2022-12-31 16:02:28 +0400
commit6c4dc344412c18b739775e587dc35e1ebe2bdc18 (patch)
tree482b18aec049ee9ec2d290d9b717ef94232276a6 /Telegram/build/prepare/prepare.py
parentefa287b7866e5777b25a2f0719d93a82458c6c60 (diff)
Fix build with various Windows locales
Diffstat (limited to 'Telegram/build/prepare/prepare.py')
-rw-r--r--Telegram/build/prepare/prepare.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Telegram/build/prepare/prepare.py b/Telegram/build/prepare/prepare.py
index 7d5a366323..1ae1aa406c 100644
--- a/Telegram/build/prepare/prepare.py
+++ b/Telegram/build/prepare/prepare.py
@@ -1464,4 +1464,10 @@ win:
# -Dprotobuf_WITH_ZLIB_DEFAULT=OFF
# cmake --build . $MAKE_THREADS_CNT
-runStages()
+if win:
+ currentCodePage = subprocess.run('chcp', capture_output=True, shell=True, text=True, env=modifiedEnv).stdout.strip().split()[-1]
+ subprocess.run('chcp 65001 > nul', shell=True, env=modifiedEnv)
+ runStages()
+ subprocess.run('chcp ' + currentCodePage + ' > nul', shell=True, env=modifiedEnv)
+else:
+ runStages()