hermes - 💡(How to fix) Fix /copy in TUI produces garbled CJK text on WSL2 [3 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Describe the bug

When using the /copy command in a WSL2 environment, copying Chinese/non-ASCII text results in garbled characters when pasted on the Windows side.

For example, copying 你好世界,测试中文 produces garbled output like 浣犲ソ涓栫晫锛屾祴璇曚腑鏂 — UTF-8 bytes reinterpreted as the system's ANSI code page (CP936 on Chinese Windows).

To Reproduce

  1. Run hermes --tui inside WSL2 (Windows Terminal)
  2. Ask the agent to output Chinese text
  3. Use /copy to copy the text
  4. Paste (Ctrl+V) into any Windows application (Notepad, browser, etc.)

Expected behavior

All Unicode characters should be preserved correctly in the clipboard.

Environment

  • OS: Windows 11 with WSL2 (Ubuntu)
  • Terminal: Windows Terminal
  • Hermes version: 0.15.1
  • Windows system locale: Chinese (code page 936)

Additional context

Affects all non-ASCII characters — CJK, emoji, accented characters, etc. The text displays correctly in the TUI itself, but becomes garbled after /copy and paste. The clipboard write goes through powershell.exe Set-Clipboard, where the piped stdin is decoded using the system's default code page instead of UTF-8.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

All Unicode characters should be preserved correctly in the clipboard.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix /copy in TUI produces garbled CJK text on WSL2 [3 pull requests]