Skip to content

fix(mcp): preserve UTF-8 on Windows stdio - #1223

Open
Ha1baraA11 wants to merge 1 commit into
jamiepine:mainfrom
Ha1baraA11:pr/voicebox-1221
Open

Ha1baraA11 wants to merge 1 commit into
jamiepine:mainfrom
Ha1baraA11:pr/voicebox-1221

Conversation

@Ha1baraA11

Copy link
Copy Markdown

The stdio proxy reads and writes JSON-RPC as UTF-8, preserving non-ASCII text on Windows.

  • Reconfigure stdin and stdout to UTF-8 before the MCP proxy starts.
  • Add a regression test that reads UTF-8 JSON-RPC through CP1252 text streams and checks the decoded text and output encoding.
  • Add the fix to the [Unreleased] MCP changelog section.

Related to #1221

Testing

  • uv run --isolated --no-project --with=httpx==0.28.1 --python=3.12 python -m unittest -v backend.tests.test_mcp_shim.TestMainConfiguresUtf8Stdio.test_main_configures_utf8_stdio_before_reading_json_rpc — 1 test passed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant