CJK full-width characters clipped at right terminal edge during text wrapping

Status Fixed / completed
Maintainer reply None cached
Activity 4 comments · opened Feb 6, 2026 · closed Feb 6, 2026

!Image
!Image

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

  1. Set terminal to a typical width (e.g., 80-120 columns)
  2. Ask Claude Code a question that produces Japanese output
  3. 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.

View original on GitHub ↗

4 Comments

github-actions[bot] · 8 months ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/14812

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

hiroka · 8 months ago

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.

hiroka · 8 months ago

Thank you for the quick fix! Much appreciated from a daily Japanese user. 🙏

github-actions[bot] · 8 months ago

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.