Explicitly set utf-8 for stdin/out/err.

This commit is contained in:
Dain Nilsson 2023-01-10 13:38:28 +01:00
parent ab6f6acfaf
commit 0b137c5f62
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8

View File

@ -32,4 +32,8 @@ if __name__ == "__main__":
run_rpc_socket(sock) run_rpc_socket(sock)
else: else:
sys.stdin.reconfigure(encoding="utf-8")
sys.stdout.reconfigure(encoding="utf-8")
sys.stderr.reconfigure(encoding="utf-8")
run_rpc_pipes(sys.stdout, sys.stdin) run_rpc_pipes(sys.stdout, sys.stdin)