[Bug] Thai text with combining characters (vowels/tone marks) renders incorrectly while typing

Resolved 💬 4 comments Opened Jan 19, 2026 by pitimon Closed Jan 20, 2026

Bug Description

Thai text containing combining characters (vowels, tone marks) renders incorrectly while typing in the Claude Code input prompt. Characters appear separated with spaces between them, making Thai input unreadable during typing.

Examples

| Input | Has Combining Chars | Renders While Typing |
|-------|---------------------|----------------------|
| ทดสอบภาษา | No | ✅ Correct |
| ที่บ้านทำตัวไม่ถูก | Yes | ❌ Broken: ที่ บ้ า น ทำ ตั ว ไ ม่ ถู ก |

Affected Thai characters:

  • สระบน (upper vowels): ิ ี ึ ื ็
  • สระล่าง (lower vowels): ุ ู
  • วรรณยุกต์ (tone marks): ่ ้ ๊ ๋
  • สระหน้า+หลัง (combined vowels): เ-ะ, แ-ะ, โ-ะ

Environment

  • Claude Code version: 2.1.12
  • OS: macOS 26.2 (Sequoia)
  • Terminal: VS Code integrated terminal (v1.108.1)
  • Shell: zsh
  • Font tested: JetBrains Mono, SF Mono (same issue with both)

Steps to Reproduce

  1. Open Claude Code CLI in VS Code terminal
  2. Type Thai text with combining characters at the prompt: ที่บ้านทำตัวไม่ถูก
  3. Observe that vowels and tone marks are separated from consonants while typing

Expected Behavior

Thai combining characters should render correctly attached to their base consonants while typing:

ที่บ้านทำตัวไม่ถูก

Actual Behavior

Thai combining characters are rendered as separate units with incorrect spacing:

ที่ บ้ า น ทำ ตั ว ไ ม่ ถู ก

The text displays correctly after command execution, but is broken during input.

Technical Analysis

Thai uses Unicode combining characters (U+0E30 to U+0E4F range) that must render on top of, below, or adjacent to base consonants. The terminal width calculation in Claude Code appears to:

  1. Incorrectly count combining characters as separate display units (width > 0)
  2. Insert spacing between base characters and their combining marks

Regression

This issue was NOT present in previous Claude Code versions (approximately v2.0.x or earlier). Thai input with combining characters worked correctly before.

Related Issues

  • #6094 - Unicode Character Input Corruption
  • #14686 - Korean characters display issues
  • #3961 - Vietnamese Unicode input handling fails
  • #14180 - Chalk template parsing error with Unicode

Workaround

Currently typing in English and having Claude respond in Thai, but native Thai input support would be preferred.

Suggested Fix

The terminal width calculation should treat Unicode combining characters (General_Category=Mn, Mark Nonspacing) as zero-width, similar to how modern terminal emulators handle them.

Reference: UAX #11: East Asian Width

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗