Unicode ambiguous-width characters (◆, ← etc.) overlap adjacent text in CLI output
Resolved 💬 3 comments Opened Mar 28, 2026 by hrmtz Closed Apr 1, 2026
Description
Characters classified as Unicode "Ambiguous Width" (e.g. ◆, ←, ■) overlap with adjacent characters in Claude Code CLI output. The rendered text appears garbled because the terminal treats these as double-width (2 cells), but Claude Code's layout engine appears to calculate them as single-width (1 cell).
This is the same class of issue seen in Powerlevel10k's setup wizard, where it asks whether ◆ occupies one or two columns.
Steps to reproduce
- Have Claude Code output text containing ambiguous-width Unicode characters, e.g.
◆任務完了◆or### ◆SNet道場◆ - Observe that
◆overlaps into the next character
Expected behavior
Characters should not overlap. The width calculation should match the terminal's rendering.
Environment
- OS: WSL2 (Ubuntu) on Windows
- Terminal: Windows Terminal (
WT_SESSIONis set) - TERM:
xterm-256color - Locale:
C.UTF-8 - Claude Code: CLI (latest)
Notes
- This likely affects all terminals that render ambiguous-width characters as fullwidth (2 cells), which is the default for CJK locales and many terminal emulators.
- A common solution is to use a library like East Asian Width aware string-width calculation (e.g. Node.js
string-widthwith{ambiguousIsNarrow: false}option or similar).
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗