gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Chinese IME composition discards all but the last character

Open shz2050 opened this issue 1 year ago • 0 comments

What happened?

When using a Chinese Input Method Editor (IME) on macOS to type into the Gemini CLI, the input field only captures the last character of the composed word or phrase. All preceding characters are lost.

This forces users to type their input in a separate text editor and then copy-paste it into the CLI, which is inefficient and hinders usability for Chinese-speaking users.

Steps to Reproduce:

  1. Start the Gemini CLI application.
  2. Switch the operating system's input method to a Chinese IME (e.g., Pinyin - Simplified).
  3. Attempt to type a multi-character Chinese word, for example, "你好" (pinyin: nihao).
  4. After typing "nihao" and pressing the spacebar or enter to confirm the composition, only the final character "好" appears in the input field.

What did you expect to happen?

The entire composed word or phrase from the IME should be correctly and completely entered into the input field.

Following the example above, after confirming the composition of "你好", the input field should display the full text: "你好".

Client information

About Gemini CLI │ │ CLI Version 0.1.8 │ Model gemini-2.5-pro │ Sandbox no sandbox │ OS darwin │ Auth Method OAuth

Login information

No response

Anything else we need to know?

No response

shz2050 avatar Jun 29 '25 03:06 shz2050