diff --git a/scripts/corpus_watch.py b/scripts/corpus_watch.py index 8d12ea69f..a09bf8ab9 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())