Chinese IME input: characters overwritten/dropped when editing mid-text
Status Closed — not planned
Reported on v2.1.159
Maintainer reply None cached
Activity 1 comment · opened Jun 1, 2026 · closed Jul 3, 2026
Bug Description
When typing Chinese using an IME in the Claude Code CLI, characters are swallowed or overwritten if you move the cursor back into already-typed text and insert more characters there.
Steps to Reproduce
- Open Claude Code CLI (
claude) - Type some Chinese via IME, e.g.
你好世界 - Use arrow keys to move cursor back between existing characters
- Type more Chinese characters via IME
Expected: New characters inserted at cursor without affecting surrounding text.
Actual: Adjacent characters get overwritten or dropped.
Root Cause (likely)
CJK characters are 3 bytes in UTF-8 but occupy 2 display columns. Node.js readline miscalculates cursor offsets for wide characters, causing incorrect overwrites during mid-text insertion.
Environment
- OS: macOS 26.2 (Build 25C56)
- Claude Code: 2.1.159
- IME: macOS built-in Pinyin
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗