CJK full-width characters clipped at right terminal edge during text wrapping
Bug Description
When Claude Code renders Japanese (CJK) text, full-width characters at the right edge of the terminal get clipped/cut off. Resizing the window slightly wider fixes the display, confirming this is a column-width calculation issue during text wrapping.
Steps to Reproduce
- Set terminal to a typical width (e.g., 80-120 columns)
- Ask Claude Code a question that produces Japanese output
- Observe the right edge of wrapped lines containing CJK characters
Expected Behavior
Full-width (2-column) CJK characters should wrap to the next line when there is only 1 column remaining at the right edge, rather than being partially rendered/clipped.
Actual Behavior
When a full-width character (2 columns wide) lands at a position where only 1 column remains on the line, the character is clipped — only half of it is rendered, or it disappears entirely.
Screenshots
Before (clipped): The character 「を」 at the end of line 3 is cut off.
After (window resized wider): The same text renders correctly with proper wrapping.
(Screenshots available but cannot be attached via CLI — the text shown is: 「悲しい」と出力することと、悲しみを — where 「を」 gets clipped)
Environment
- Claude Code v2.1.32
- macOS Darwin 24.6.0
- Terminal: tmux in iTerm2 / Terminal.app
- Language setting: Japanese
Notes
This is a common CJK rendering issue. The text wrapping logic likely needs to check wcwidth() or equivalent to determine that CJK characters occupy 2 columns, and wrap early when only 1 column remains at the line edge.
4 Comments
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
This is not a duplicate of #14812.
#14812 was specific to diff view only and was closed as resolved in v2.0.74.
This issue affects all standard text output (not just diffs), and is reproducible on the latest v2.1.32. The CJK full-width character clipping occurs during normal message rendering — any line wrapping where a 2-column-wide character meets the right terminal edge.
Different scope, different component, still broken.
Thank you for the quick fix! Much appreciated from a daily Japanese user. 🙏
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.