[BUG] Thai language input not processing correctly in CLI

Resolved 💬 3 comments Opened Jan 19, 2026 by surajitpip Closed Jan 23, 2026

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?

### Description

Thai text input in Claude Code CLI displays incorrectly while typing. Characters appear overlapped/garbled
in the input field, though the actual text is transmitted correctly.

### Environment

  • Claude Code version: v2.1.12
  • Terminal: iTerm2 (Build 3.6.6)
  • OS: macOS Tahoe 26.2
  • Shell: zsh

### Actual Behavior

  • Characters overlap and appear garbled while typing
  • Cursor position is miscalculated
  • The issue seems related to Thai combining characters (vowels and tone marks that stack on consonants)

### Screenshot

<img width="643" height="337" alt="Image" src="https://github.com/user-attachments/assets/8c38f03d-83bc-48cf-a657-9ea4d12c6bb3" />

What Should Happen?

Thai text should render correctly with proper character positioning, similar to how it renders in other
terminal applications or when using echo.

Error Messages/Logs

Steps to Reproduce

  1. Open Claude Code in iTerm2
  2. Type Thai text with combining characters (e.g., "ช่วยผมด้วยครับ")
  3. Observe the input field rendering

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.12

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

### Additional Context

  • Running echo "ทดสอบภาษาไทยครับ" in the iTerms2 & ChatGPT Codex terminal displays correctly
  • The actual text sent to Claude is correct (only the input display is broken)
  • This issue started occurring recently (was working before)

### Possible Cause

Thai script uses combining characters (่ ้ ๊ ๋ ็ ั ิ ี ึ ื etc.) that stack on base consonants. The terminal
handler may be calculating character width incorrectly for these Unicode combining marks.

View original on GitHub ↗

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