From 6c4dc344412c18b739775e587dc35e1ebe2bdc18 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sat, 31 Dec 2022 11:24:48 +0400 Subject: [PATCH] Fix build with various Windows locales --- Telegram/build/prepare/prepare.py | 8 +++++++- cmake | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Telegram/build/prepare/prepare.py b/Telegram/build/prepare/prepare.py index 7d5a36632..1ae1aa406 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() diff --git a/cmake b/cmake index 4d8c8a0f8..de92292f8 160000 --- a/cmake +++ b/cmake @@ -1 +1 @@ -Subproject commit 4d8c8a0f84f271a14666a36674d2781a2fe155a9 +Subproject commit de92292f89c48848e4350ae1a6a531309b5aca8c