Japanese characters occasionally corrupted in output (file writes and terminal)

Status Closed — duplicate
Maintainer reply None cached
Activity 3 comments · opened Apr 7, 2026 · closed Apr 10, 2026

Bug

Claude Code occasionally outputs corrupted Japanese (CJK) characters in both file writes and terminal output. The corruption appears as replacement characters (U+FFFD / ), typically rendering as ��� in the terminal.

Examples found in a single session

| Original intent | Corrupted output |
|-----------------|-----------------|
| 定番問題セット | 定番問題セッ��� |
| キャンセル | キャ���セル |
| インポート | インポ���ト |
| テンプレート名 | テ���プレート名 |
| 既にありません | 既にあり��せん |

Pattern

  • Seems to affect multi-byte characters (Japanese hiragana/katakana/kanji) randomly
  • Not every string is affected — most output is fine
  • Corruption typically drops 1-3 bytes from a character, resulting in U+FFFD replacement
  • Occurs in both Write tool output and Edit tool output
  • Observed across multiple files written in a single session
  • No obvious pattern in which characters are affected (hiragana, katakana, and kanji all seen)

Environment

  • macOS (Darwin 25.3.0)
  • Claude Code CLI
  • Model: claude-opus-4-6 (1M context)
  • Shell: zsh
  • Terminal: likely UTF-8 locale

Impact

Silently introduces broken strings into source code. Requires manual review and correction after each session.

View original on GitHub ↗

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