From: Raphael Finkel (raphael@cs.uky.edu)
Date: Thu Jan 09 2003 - 09:27:30 EST
> from Dom Lachowicz <domlachowicz@yahoo.com>, Jan 8, Re: XIM
> > UT_NOT_REACHED at ev_UnixKeyboard.cpp:143
>
> This means that your XIM is sending a 0 length entry
> or invalid UTF8 to the input module, AFAIK.
>
> Please Please Please Please someone find some
> documentation on how the XIM stuff works on GTK+2
Here is my best guess. Things I am particularly unsure about I have marked
with (?).
XIMs
----
XIMs have several options that determine how they send stuff to the client
application (in our case, AbiWord with Gtk+2). The XIM may send a character
array, a KeySym, or both.
If the XIM sends a character array, it is (?) encoded according to whatever
locale the XIM is running in; during initial connection with the XIM, the
application must (?) match the locale and ask for it specifically. In order
for a locale to work at all, there must (?) be appropriate locale files on the
computer; you can't just invent a reasonable locale like yi.UTF_8 and expact it
to work.
If the XIM sends a KeySym, it may either be one defined in <X11/keysymdef.h>,
one that the application has introduced via XChangeKeyboardMapping(), or a
UCS-2 code with the 0x1000000 bit asserted.
If the XIM sends "both", the application is supposed to figure out what is
meant; I can't.
keypressIM.c
------------
This is my own Yiddish XIM. Sorry for its terrible name; I will change that
once things start to work. The source is at
http://www.cs.uky.edu/~raphael/private/keypressIM.c; it uses the IMdkit
library, which you can find as part of InterXim at
http://www.oksid.ch/xd640/download.html.
This XIM registers itself as "keypress" in locale "C". It uses the KeySym
method for communicating with the application, sending only UCS-2 with the
0x1000000 bit and the well-understood KeySym 0xff08 (XK_BackSpace).
I have verified that this XIM works by using Yudit as an application; Yudit is
a multilingual text editor written by Gaspar Sinai that you can get from
www.yudit.org.
I would be glad to switch to the character method of communicating with the
application, if I could find a reliable way to communicate UTF-8 data. I have
asked Gaspar Sinai (Yudit) and Hidetoshi Tajima (Gtk+2.0) for advice in this
regard.
Gtk+2.0
-------
The implementers of Gtk+2.0 have chosen only to deal with character arrays from
XIMs. I have complained about this choice; see
http://bugzilla.gnome.org/show_bug.cgi?id=102779 for some details.
Because of this choice, Gtk+2.0 is getting the characters sent by keypress to
AbiWord but it ignores their contents, just returning a 0-length string to
AbiWord, which therefore hits the UT_NOT_REACHED bugtrap.
Raphael
This archive was generated by hypermail 2.1.4 : Thu Jan 09 2003 - 09:31:36 EST