[BUG] Thai text input in Claude CLI interactive mode is broken
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Dear Anthropic Support Team,
I am a paying Claude Pro customer and I need to report a CRITICAL bug in Claude CLI that makes it completely unusable for Thai language input.
ISSUE SUMMARY:
Thai text input in Claude CLI interactive mode is broken. Characters display incorrectly, text doesn't wrap properly, and continues invisibly beyond screen edge.
SEVERITY: HIGH
- Affects all Thai language users (~70 million speakers)
- Makes CLI completely unusable for Thai input
- This impacts paying customers who expect a working product
EVIDENCE:
- Regular terminal (kitty/gnome-terminal): Thai displays perfectly ✓
- Claude CLI prompt: Thai characters broken, wrong spacing, no line wrap ✗
- Fonts installed: Noto Sans Thai, TH Sarabun - working correctly ✓
- Locale: th_TH.UTF-8 - configured correctly ✓
ENVIRONMENT:
- OS: Ubuntu 24.04 LTS
- Terminal: kitty (also tested with gnome-terminal, alacritty)
- Claude CLI version: v2.1.19
- Locale: th_TH.UTF-8
ROOT CAUSE:
Claude CLI's input handler does not properly support Unicode combining characters used in Thai language (U+0E34-U+0E3A, U+0E47-U+0E4E).
EXPECTED BEHAVIOR:
Thai input should work identically to English - proper display, proper line wrapping, proper character editing.
ACTUAL BEHAVIOR:
Thai text with vowels/tone marks above/below base characters:
- Displays with incorrect spacing
- Doesn't wrap to new line at terminal edge
- Continues invisibly beyond screen width
- Makes interactive mode completely unusable
SCREENSHOTS:
[Attach screenshots from your uploads showing the problem]
REPRODUCTION STEPS:
- Launch: claude
- Type Thai text with combining characters: "ภาษาไทยพิมพ์ยาวๆไม่ขึ้นบรรทัดใหม่"
- Observe: characters display incorrectly, no proper line wrapping
IMPACT:
As a paying customer, I expect Claude CLI to work with my native language. This is not a minor UI issue - it's a complete blocker for Thai language users.
REQUEST:
Please prioritize fixing this bug. Similar issues likely affect other languages with combining characters (Vietnamese, Arabic, Hebrew, etc.).
TECHNICAL SUGGESTION:
The input library (likely readline or prompt_toolkit) needs proper wcwidth() implementation for Unicode combining characters.
Thank you for your attention to this matter.
Best regards,
What Should Happen?
Thai language input should work exactly like English input:
- Characters with combining marks (vowels/tones above/below) should display correctly with proper spacing
- Text should wrap to new line when reaching terminal edge
- Long Thai sentences should be editable normally
- Cursor movement should work correctly with Thai characters
- Backspace/delete should work properly with combining characters
Expected: Thai text input works identically to English - proper display, proper wrapping, proper editing in Claude CLI interactive prompt.
Error Messages/Logs
Steps to Reproduce
- Open terminal (tested with kitty, gnome-terminal, alacritty)
- Verify locale is set to th_TH.UTF-8:
locale - Verify Thai fonts are installed (Noto Sans Thai, TH Sarabun New)
- Run:
claude - In the interactive prompt, type Thai text with vowels/tone marks above/below:
Example: "ภาษาไทยพิมพ์ยาวๆไม่ขึ้นบรรทัดใหม่ ทดสอบการแสดงผลกับสระบนและวรรณยุกต์"
- Observe:
- Characters display with incorrect spacing
- Text doesn't wrap at terminal edge
- Text continues invisibly beyond screen width
- Cursor position is wrong
Note: The SAME Thai text displays perfectly in the regular terminal prompt before launching claude.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
claude --version 2.1.19 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗