Enforce Python to run in UTF-8 mode

When running Python via QProcess on Windows, the output code page will be set to the system default instead of UTF-8.
This commit enforces that UTF-8 will be used unconditionally.

Supersedes #23629.
PR #23633.
This commit is contained in:
Chocobo1
2025-12-22 12:00:27 +08:00
committed by GitHub
parent b718cc52fa
commit e79be5853e
4 changed files with 4 additions and 0 deletions

View File

@@ -38,6 +38,7 @@
namespace Utils::ForeignApps
{
inline const QString PYTHON_ISOLATE_MODE_FLAG = u"-I"_s;
inline const QString PYTHON_UTF8_MODE_FLAG = u"-Xutf8=1"_s;
struct PythonInfo
{