Skip to content

fix: reconfigure stdio to UTF-8 on Windows#1259

Open
oussamalembarki wants to merge 2 commits intoMemPalace:developfrom
oussamalembarki:fix/mcp-windows-unicode-encoding
Open

fix: reconfigure stdio to UTF-8 on Windows#1259
oussamalembarki wants to merge 2 commits intoMemPalace:developfrom
oussamalembarki:fix/mcp-windows-unicode-encoding

Conversation

@oussamalembarki
Copy link
Copy Markdown
Contributor

Fixes #1242.

This PR adds a platform check to reconfigure sys.stdin and sys.stdout to use UTF-8 encoding when running on Windows. This prevents UnicodeDecodeError when the MCP server receives non-ASCII characters (emojis, CJK, etc.) from clients.

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.

diary_write fails with Unicode characters on Windows (cp950 stdin encoding)

3 participants