Skip to content

[Bug] Can not type multiple Chinese characters (Hanzi) in extraterm #494

@suxpert

Description

@suxpert

#105 showed that Chinese support has been fixed, but it seems that only the display of Chinese characters is fixed (#112), not Chinese input.

I confirmed that we can type Chinese in extraterm, but in a very strange way: if we type characters one-by-one, the selected Hanzi is accepted and displayed in extraterm. However, if we type phrases, any phrase or word composed of more than one Hanzi is not accepted as input. See the attached screencast.

ET-bug-ime.mp4

Some notes about Chinese input methods:

There are many different input methods for CJK languages that turn ASCII keyboard inputs into CJK characters, using methods such as table-based mapping, statistical prediction, or even more advanced techniques. The most commonly used Chinese input method is the Pinyin family, where users type pinyin with the keyboard, and the input method engine transforms them into Chinese characters. For example, the phrase nihao can be converted to 你好 (with the highest likelihood), or ni as a single pinyin can be converted to characters like (you), (mud), (girl), etc., as a single Hanzi.

It is much more convenient to type longer phrases or sentences and convert them as a whole to Chinese using modern input engines.

Usually, applications that support input method framework integration (e.g., TSF under Windows, XIM under X11, or text-input-v1/v3 under Wayland) should be able to show the typed ASCII in the text area before the input method converts them, and replace them with the selected candidates from the input method, along with other functions (such as cursor position synchronization).

The situation is usually much more complex under Linux, since there are different frameworks to work with. However, it should be easier under Windows to support input methods in text areas. For Qt applications, perhaps the APIs related to QInputMethodEvent would be helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions