[Bug] Korean text output garbled when copied from Windows Terminal (TUI rendering mojibake)
Environment
- Claude Code version: 2.1.90
- OS: Windows 11 (Build 26200)
- Terminal: Windows Terminal (latest)
- Shell: PowerShell 7.6.0
- Font: D2CodingLigature Nerd Font
- System ACP/OEMCP: 949 (CP949/Korean) — Beta UTF-8 system locale is disabled
- Terminal encoding: UTF-8 (chcp 65001, set via PS7 profile)
Description
Korean text output by Claude Code in the terminal is displayed as mojibake and copies as garbled characters. The text appears incorrectly on screen, and copying it to clipboard gives the wrong (mojibake) characters rather than the original Korean.
Steps to Reproduce
- Open Windows Terminal with PowerShell 7 profile
- Ensure encoding is set to UTF-8 (chcp 65001, Console::OutputEncoding = UTF8)
- Start Claude Code (
claude) - Ask any question and receive a Korean response
- Try to select and copy the Korean response text (Ctrl+C or mouse select + copy)
Expected Behavior
Korean text is displayed correctly and copies as valid Unicode Korean characters.
Actual Behavior
Korean text renders as mojibake (garbled characters) instead of readable Korean. Copying the garbled text gives the garbled characters, not the original Korean.
Key Finding
Codex CLI in the exact same terminal session works correctly — Korean output from Codex can be copied without any garbling. This confirms the issue is specific to Claude Code's Ink TUI rendering layer, not the terminal encoding setup.
Diagnostic Info
System ACP: 949 (CP949/Korean)
System OEMCP: 949 (CP949/Korean)
Console InputEncoding: 65001 (UTF-8)
Console OutputEncoding: 65001 (UTF-8)
chcp: 65001
Windows Terminal profile: encoding = "utf-8" (set in settings.json)
Related Issues
- #34247 — Unicode characters render as mojibake on Windows terminals (OPEN)
- #11695 — Korean characters corrupted in /export (Closed Not Planned)
- #38798 — Korean IME cursor position wrong (Closed Duplicate)
Notes
The v2.1.70 fix (using PowerShell Set-Clipboard for CJK clipboard writes) addressed the /export path but does not fix the terminal rendering mojibake that occurs when Claude Code outputs responses to the terminal.
Codex and Gemini CLI do not have this problem in the same environment, suggesting this is specific to Claude Code's Ink-based TUI rendering pipeline on Windows.
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗