[BUG] MCP tool result displays mojibake for non-ASCII UTF-8 text (Korean) on Windows

Resolved 💬 3 comments Opened Mar 14, 2026 by knewstimek Closed Mar 17, 2026

Description

MCP tool results containing non-ASCII UTF-8 characters (Korean in this case) are displayed as mojibake in the Claude Code VSCode extension UI, even though the raw JSON bytes are correct UTF-8.

This is the same class of issue as #9723 (German Umlauts), but that issue is locked so filing separately.

Environment

  • OS: Windows 10 Pro (10.0.19045)
  • Claude Code: VSCode extension (latest)
  • MCP Server: Custom Go server (agent-tool)

Reproduction

  1. MCP tool calls netsh advfirewall which outputs CP949-encoded Korean text
  2. The Go MCP server decodes CP949 → UTF-8 via GetACP() + golang.org/x/text
  3. The JSON-RPC response contains valid UTF-8 in mcp.TextContent{type: "text", text: "..."}
  4. Claude Code UI displays mojibake instead of Korean characters

Expected: 규칙 이름: BranchCache 호스트 캐시 서버(HTTP-In)
Actual: Rule Name: BranchCache 몄뒪 罹먯떆 쒕쾭(HTTP-In)

Proof the JSON data is correct UTF-8

Expected UTF-8 hex: ed98b8ec8aa4ed8ab820ecba90ec8b9c20ec849cebb284 (호스트 캐시 서버)
Actual UTF-8 hex:   ed98b8ec8aa4ed8ab820ecba90ec8b9c20ec849cebb284
Match: True

Saved the same MCP JSON text to a file and read it back — Korean displays perfectly. The same MCP server's read tool also displays Korean correctly from files, so the issue is specific to how certain tool results are rendered.

Possibly related

  • #9723 (German Umlauts mojibake in MCP tool results — locked)
  • #31295 (Bash tool UTF-8 corruption on Windows)
  • #11695 (Korean characters corrupted with /export on Windows)

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗