Skip to content

[BUG] Thai language input not processing correctly in CLI #19237

Description

@surajitpip

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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

Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions