Pin Python SDK app-server stdio to UTF-8 on Windows (#15244)
## TL;DR Pin the Python app-server SDK subprocess pipes to UTF-8 so Windows users on non-UTF-8 locales do not hit `UnicodeDecodeError` when the `codex` child emits UTF-8 text. - add `encoding="utf-8"` to the `subprocess.Popen(...)` call in `AppServerClient.start()` - add a focused regression test that asserts the client launches the subprocess with UTF-8 text I/O - validates with `python -m pytest sdk/python/tests/test_client_rpc_methods.py sdk/python/tests/test_client_process_launch.py sdk/python/tests/test_public_api_runtime_behavior.py` Fixes #14311.
This commit is contained in:
parent
79ad7b247b
commit
9e31aeadce
1 changed files with 1 additions and 0 deletions
|
|
@ -181,6 +181,7 @@ class AppServerClient:
|
|||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
text=True,
|
||||
encoding="utf-8",
|
||||
cwd=self.config.cwd,
|
||||
env=env,
|
||||
bufsize=1,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue