From 5f8b70fcc3a2086ee5248281853468b5632cb5c4 Mon Sep 17 00:00:00 2001 From: Kevin Flores Date: Wed, 25 Nov 2026 16:26:01 -0500 Subject: [PATCH] fix: corpus_watch sets errors='replace' on stdout like the other tools --- scripts/corpus_watch.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/corpus_watch.py b/scripts/corpus_watch.py index 8d12ea69f7..a09bf8ab9b 100644 --- a/scripts/corpus_watch.py +++ b/scripts/corpus_watch.py @@ -192,4 +192,8 @@ def run_once(): if __name__ == "__main__": + try: # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode + sys.stdout.reconfigure(errors="replace") + except (AttributeError, ValueError, OSError): + pass sys.exit(main())