Skip to content

Introduction

Scope

The internationalization in the X Window System Version 11, Release 5 (X11R5) provides a common API which application developers can use to create portable internationalized programs and to adapt them to the requirements of different native languages, local customs, and character string encodings (this is called "localization"). As one of its internationalization mechanisms X11R5 has defined a functional interface for internationalized text input, called XIM (X Input Method).

When a client-server model is used with an IM (Input Method) implementation, a protocol must be established between the client and the server. However, the protocol used to interface Input Method Servers (IM Servers) with the Input Method libraries (IM libraries) to which applications are linked was not addressed in X11R5. This led application developers to depend on vendor-specific input methods, decreased the user's choice of available input methods, and made it more difficult for developers to create portable applications. This paper describes the Input Method Protocol developed for X11R6 to resolve the above problems and to address the requirements of existing and future input methods.

The Input Method Protocol is independent from the transport layer used in communication between the IM library and the IM Server. Thus, the input method protocol can be built on any inter-process communication mechanism, such as TCP/IP or the X protocol.

In addition, the protocol provides for future extensions such as differing input model types.

Background

Text input is much more simple for some languages than others. English, for instance, uses an alphabet of a manageable size, and input consists of pressing the corresponding key on a keyboard, perhaps in combination with a shift key for capital letters or special characters.

Some languages have larger alphabets, or modifiers such as accents, which require the addition of special key combinations in order to enter text. These input methods may require "dead-keys" or "compose-keys" which, when followed by different combinations of key strokes, generate different characters.

Text input for ideographic languages is much less simple. In these languages, characters represent actual objects rather than phonetic sounds used in pronouncing a word, and the number of characters in these languages may continue to grow. In Japanese, for instance, most text input methods involve entering characters in a phonetic alphabet, after which the input method searches a dictionary for possible ideographic equivalents (of which there may be many). The input method then presents the candidate characters for the user to choose from.

In Japanese, either Kana (phonetic symbols) or Roman letters are typed and then a region is selected for conversion to Kanji. Several Kanji characters may have the same phonetic representation. If that is the case with the string entered, a menu of characters is presented and the user must choose the appropriate one. If no choice is necessary or a preference has been established, the input method does the substitution directly.

These complicated input methods must present state information (Status Area), text entry and edit space (Preedit Area), and menu/choice presentations (Auxiliary Area). Much of the protocol between the IM library and the IM Server involves managing these IM areas. Because of the size and complexity of these input methods, and because of how widely they vary from one language or locale to another, they are usually implemented as separate processes which can serve many client processes on the same computer or network.

Input Method Styles

X11 internationalization support includes the following four types of input method:

- on-the-spot:

The client application is directed by the IM Server to display all pre-edit data at the site of text insertion. The client registers callbacks invoked by the input method during pre-editing.

- off-the-spot:

The client application provides display windows for the pre-edit data to the input method which displays into them directly.

- over-the-spot:

The input method displays pre-edit data in a window which it brings up directly over the text insertion position.

- root-window:

The input method displays all pre-edit data in a separate area of the screen in a window specific to the input method.

Client applications must choose from the available input methods supported by the IM Server and provide the display areas and callbacks required by the input method.