fix: keep check.py from crashing on non-Latin text on Windows

When stdout is a pipe, as it is when an agent runs the script, Python
on Windows writes with the ANSI code page. A problem line quoting text
such as "POD WIEŻĄ" raised UnicodeEncodeError, so the report was lost.
Write stdout as UTF-8 instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
tcoverstandClaude Opus 5.5 committed 2026-11-15 13:14:36 -05:00
1 parent df3636307b
commit ae1458e7aa
1 file changed
+2
+2
View File
@@ -99,6 +99,8 @@ def write(tree, path):
def main():
if hasattr(sys.stdout, "reconfigure"):
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
ap = argparse.ArgumentParser()
ap.add_argument("svg")
ap.add_argument("--out", default=None)