Compare commits

...
Author SHA1 Message Date
praisonai-triage-agent[bot]andMervin Praison 25e7af3c8f fix: force UTF-8 env for child processes in suite runner
Force PYTHONIOENCODING=utf-8 (instead of setdefault) so an inherited
non-UTF-8 value cannot conflict with the parent's UTF-8 output decoder
and corrupt captured reports (per Greptile review). Also set PYTHONUTF8=1
to enable UTF-8 Mode, covering child-side file I/O on Windows (per Gemini
review).

Co-authored-by: Mervin Praison <[email protected]>
2026-07-21 09:31:10 +00:00
@@ -71,8 +71,11 @@ class ScriptRunner:
# Apply overrides
env.update(self.env_overrides)
# Ensure child Python processes emit UTF-8 on Windows (avoid cp1252 decode errors)
env.setdefault("PYTHONIOENCODING", "utf-8")
# Ensure child Python processes emit UTF-8 on Windows (avoid cp1252 decode errors).
# Force (not setdefault) so an inherited non-UTF-8 value can't corrupt the parent's
# UTF-8 decoding of captured output. PYTHONUTF8 also covers child-side file I/O.
env["PYTHONIOENCODING"] = "utf-8"
env["PYTHONUTF8"] = "1"
return env