claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] error typing Vietnamese telex

Open yeucodonvn opened this issue 1 year ago • 23 comments

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?

I'm having an error typing Vietnamese telex, I use windows terminal and vscode terminal both have the same problem, copy and paste is still normal, I tried changing the typing method but it doesn't work, I uninstalled Claude Code and reinstalled but it doesn't work

  • 1.0.120 (Claude Code)
  • windows 11 pro
  • windows terminal
    • nodejs v22

https://github.com/user-attachments/assets/556158c0-e883-4415-aca0-f2ba9dae5d94

What Should Happen?

I'm having an error typing Vietnamese telex, I use windows terminal and vscode terminal both have the same problem, copy and paste is still normal, I tried changing the typing method but it doesn't work, I uninstalled Claude Code and reinstalled but it doesn't work

  • 1.0.120 (Claude Code)
  • windows 11 pro
  • windows terminal
    • nodejs v22

Error Messages/Logs


Steps to Reproduce

  1. run claude code
  2. type example "hãy sửa code" unicode telex

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

1.0.120 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

No response

yeucodonvn avatar Sep 21 '25 22:09 yeucodonvn

same on : claude code v2.0.14 window 11 pro nodejs v22.17.1

dikhamchua avatar Oct 14 '25 03:10 dikhamchua

Same here

chiminhtathoj avatar Nov 18 '25 03:11 chiminhtathoj

https://github.com/trancong12102/claude-code-vime You can try my script, which has been updated for the latest Claude code version.

trancong12102 avatar Dec 06 '25 01:12 trancong12102

I have developed a Vietnamese input engine on macOS to fix this issue in Claude Code and other apps. You can use it here:

https://github.com/khaphanspace/gonhanh.org

khaphanspace avatar Dec 09 '25 02:12 khaphanspace

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] avatar Jan 08 '26 10:01 github-actions[bot]

Thai Language Also Affected

Same issue with Thai language input on macOS.

Environment

  • OS: macOS 15.2 (Darwin 25.2.0)
  • Terminal: iTerm2 / Terminal.app
  • Claude Code: Latest version
  • Input Method: macOS Thai keyboard

Problem

Thai characters with combining vowels and tone marks display incorrectly when typing directly in Claude Code CLI prompt. The vowels get separated from consonants:

What I type: ภาษาไทยพิมพ์ไม่ถูกต้อง What displays: ภาษาไทยพิ มพ์ ไม่ ถู กต้ อง (spaces inserted between consonants and vowels)

Workaround

Copy/paste works correctly - only direct typing is broken.

Root Cause (Same as Vietnamese)

Thai uses combining characters for:

  • Vowels above/below consonants (สระบน/ล่าง): ิ ี ึ ื ุ ู
  • Tone marks (วรรณยุกต์): ่ ้ ๊ ๋
  • Vowel marks that wrap around consonants: เ แ โ ไ ใ

Claude Code CLI's custom input handling doesn't properly handle these combining characters.

Impact

Affects Thai users who need to communicate in their native language.

+1 for fixing IME/combining character support across all affected languages (Vietnamese, Thai, Korean, Chinese, Japanese, etc.)

pitimon avatar Jan 25 '26 13:01 pitimon

Same on claude code v2.1.20 native window 11 pro

khuehm1511 avatar Jan 27 '26 15:01 khuehm1511

Same issue here. Windows 11, PowerShell terminal. Vietnamese Telex input - characters like ư, ợ, ơ cannot be typed in Claude Code input row, but work normally in regular PowerShell prompt. Copy-paste works as a workaround. Claude Code version: latest.

Thanh-To-GameEng avatar Feb 03 '26 09:02 Thanh-To-GameEng

xài https://github.com/0x0a0d/fix-vietnamese-claude-code fix được claude bên npm nha

0x0a0d avatar Feb 04 '26 14:02 0x0a0d

xài https://github.com/0x0a0d/fix-vietnamese-claude-code fix được claude bên npm nha

cám ơn nhưng vẫn còn lỗi nếu gõ dấu ở cuối chữ. Mình dùng EVKey

Image

Thanh-To-GameEng avatar Feb 06 '26 08:02 Thanh-To-GameEng

xài https://github.com/0x0a0d/fix-vietnamese-claude-code fix được claude bên npm nha

cám ơn nhưng vẫn còn lỗi nếu gõ dấu ở cuối chữ. Mình dùng EVKey

Image

gỡ cài lại thử bác ơi

0x0a0d avatar Feb 06 '26 09:02 0x0a0d

xài https://github.com/0x0a0d/fix-vietnamese-claude-code fix được claude bên npm nha

dùng evkey trên windows telex unicode gõ vẫn mất chữ ạ ví dụ chữ "của"

yeucodonvn avatar Feb 06 '26 18:02 yeucodonvn

xài https://github.com/0x0a0d/fix-vietnamese-claude-code fix được claude bên npm nha

dùng evkey trên windows telex unicode gõ vẫn mất chữ ạ ví dụ chữ "của"

Image

0x0a0d avatar Feb 07 '26 00:02 0x0a0d

+1

doanbactam avatar Feb 27 '26 01:02 doanbactam

Các bạn cài đặt Gõ Nhanh sẽ gõ được nhé. Ngoài Claude Code thì toàn bộ các app khác (Zen, Spotlight, Safari...) cũng hỗ trợ mượt mà

https://github.com/khaphanspace/gonhanh.org

khaphanspace avatar Feb 27 '26 01:02 khaphanspace

Các bạn cài đặt Gõ Nhanh sẽ gõ được nhé. Ngoài Claude Code thì toàn bộ các app khác (Zen, Spotlight, Safari...) cũng hỗ trợ mượt mà

https://github.com/khaphanspace/gonhanh.org

Sếp có kế hoạch cho win và linux không ạ

doanbactam avatar Feb 27 '26 11:02 doanbactam

I've created a fix that addresses the root cause of this issue on Windows: claude-code-vietnamese-fix

Root cause: Vietnamese IMEs (Unikey, OpenKey, EVKey) send backspace + replacement character as separate events. Claude Code's React-based input handler computes cursor state once per render — so multiple rapid backspaces all operate on the same stale state, causing only 1 of N backspaces to take effect.

Fix: Two-layer patch — an outer wrapper buffers rapid backspace events (16ms window) and combines them with the replacement character, then processes everything atomically through the existing \x7f handler.

One command to apply: node patch-vietnamese-ime.js

Tested with Unikey Telex on Windows 11, Claude Code v2.1.74. Other IMEs (OpenKey, EVKey) and input methods (VNI, VIQR) are untested but should work with the same mechanism.

tvtdev94 avatar Mar 13 '26 15:03 tvtdev94

+1 Confirming this bug on Windows 11 Pro with Claude Code CLI. Vietnamese IME (Unikey/EVKey) causes double characters when typing directly in the TUI — e.g. "xin chào" becomes "xin chaào". Copy-paste works fine as a workaround. The experimental.input.forceVT Windows Terminal setting does not fix the issue since Claude Code uses its own input handling layer.

hoquanganh09 avatar Mar 18 '26 09:03 hoquanganh09

Update v2.0.1 — now supports the native binary (WinGet, macOS, Linux) in addition to npm install.

npx claude-code-vietnamese-fix

Auto-detects whether you have the npm (cli.js) or binary version and patches accordingly. Tested on Windows 11 with WinGet binary.

tvtdev94 avatar Apr 05 '26 01:04 tvtdev94

+1

kenzouno1 avatar Apr 08 '26 02:04 kenzouno1