mirror of
https://github.com/mankidev/antialgorithm.git
synced 2026-11-30 19:33:35 -10:00
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:
1 parent
df3636307b
commit
ae1458e7aa
1 file changed
+2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user