C:/Program Files/Git/copy command garbles Japanese (UTF-8) text on Windows clipboard

Resolved 💬 3 comments Opened Apr 8, 2026 by katsuzakitomohiro Closed Apr 11, 2026

Preflight Checklist

  • [x] I have searched the existing issues to make sure this bug has not been reported yet
  • [x] I am filing a single bug report (not multiple in one issue)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When using the /copy command to copy a response containing Japanese (or other non-ASCII/UTF-8) text to the clipboard on Windows, the copied text becomes garbled (文字化け/mojibake). Pasting the clipboard content into another session or application results in unreadable characters.

Manually selecting and copying the same text from the terminal works correctly.

What Should Happen?

The /copy command should correctly copy UTF-8 text (including Japanese, Chinese, Korean, and other non-ASCII characters) to the Windows clipboard without encoding corruption.

Steps to Reproduce

  1. Run Claude Code on Windows with PowerShell 7
  2. Ask Claude a question that produces a response containing Japanese text (e.g., 日本語で挨拶して)
  3. Use the /copy command to copy the response
  4. Paste the clipboard content into another application or session (e.g., Notepad, another terminal)
  5. Observe that the Japanese characters are garbled

Is this a regression?

Unknown

Claude Code Version

2.1.94

Platform

Anthropic

Operating System

Windows

Terminal/Shell

PowerShell 7.6.0 (Windows Terminal)

Error Messages/Logs

N/A — No error is displayed. The command appears to succeed, but the clipboard content is encoding-corrupted.

Claude Model

_No response_

Last Working Version

_No response_

Additional Information

This is likely caused by the clipboard utility (e.g., clip.exe or the underlying Node.js clipboard library) not correctly handling UTF-8 encoded text on Windows. clip.exe interprets piped input using the system's default code page (CP932/Shift-JIS on Japanese Windows) rather than UTF-8.

View original on GitHub ↗

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