fix: decode run_tool subprocess output as UTF-8 to handle tqdm Unicode chars on Windows

This commit is contained in:
Tran G. (Revernomad) Khoa
2026-04-10 22:37:35 +07:00
parent 3276f4b63f
commit 68fcaaf6d9

View File

@@ -227,11 +227,14 @@ class ArmaModManagerApp(ctk.CTk):
try:
env = os.environ.copy()
env["PYTHONUNBUFFERED"] = "1"
env["PYTHONUTF8"] = "1"
proc = subprocess.Popen(
[sys.executable, "-u", str(PROJECT_ROOT / script)] + extra,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
text=True,
encoding="utf-8",
errors="replace",
cwd=str(PROJECT_ROOT),
env=env,
)