After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 96053 - Compose key not working
Compose key not working
Status: RESOLVED NOTABUG
Product: gtk+
Classification: Platform
Component: Input Methods
2.0.x
Other Linux
: Normal normal
: ---
Assigned To: Hidetoshi Tajima
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2002-10-17 13:03 UTC by Jungshik Shin
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jungshik Shin 2002-10-17 13:03:26 UTC
Compose key behaves in a strange manner. 
In my /usr/XFree86/lib/X11/locale/en_US.UTF-8/Compose,

I added several lines for composing Korean Hangul Jamos
as shown below(bugzilla running here appears to be broken
with UTF-8 input so that you'll see garbage between
quotation marks below even if you set the encoding to UTF-8
in your browser)

<Multi_key> <U1100> <U1100> : "&#4353;" U1101
<Multi_key> <U01106> <U0110b> : "&#4381;" U111d
<Multi_key> <U1107> <U110b> : "&#4395;" U112b
<Multi_key> <U1107> <U1107> : "&#4360;" U1108
<Multi_key> <U1107> <U1107> <U110b> : "&#4396;" U112c

I also have activated Xkb I've made for Korean
input (available at http://jshin.net/i18n/korean/kor2v.xkb).


This combination works fine with xedit. However, in gedit it doesn't work.
Well, in gedit, most things work except that Compose-key doesn't work.
I got a beep when I tried one of 'compose' sequences above. 
Strange is that 'compose A E' or 'compose a e' works just
fine in both gedit and xedit. gedit was launched under en_US.UTF-8
locale so that Compose mechanism was for sure turned on as
the fact that 'Compose a e' worked is not sufficient to prove that :-).


I found that bug 93575 was filed for a similar problem,
but it seems like it's Solaris-specific. Moreover, in
that case, even 'compose a e' doesn't work while in my
case 'compose a e' works but 'compose <U1107><U110b>'
doesn't work.  Therefore, I'm filing
a new bug for this.
Comment 1 Owen Taylor 2002-10-17 14:55:59 UTC
The Xlib compose tables are only used if the X Input Method input
method is in use.

Whether that is used or not depends on the locale ... it isn't
used for en_US. 

You can force it on with 'export GTK_IM_MODULE=xim'

Comment 2 Jungshik Shin 2002-10-17 15:12:00 UTC
Isn't it the other way around? That is, when XIM is in use,
Compose doesn't work because Compose is a simple XIM. At least, that's
what I found with xedit. 
(strace shows that compose.dir and Compose file is not read at all 
if the locale is ko_KR.UTF-8 and XIM server is running).

Anyway, following your suggestion, I set the env. variable
GTK_IM_MODULES to xim
and tried again. However, that didn't make any difference.
Actually, I got an error message that 'Loading IM context type 'xim'
failed' which is expected because the XIM I'm running cannot
be accessible from non-Korean locale. 

Moreover, if Compose is not used at all, how come 'Compose a e'
works while 'Compose <U11xx> <U11xx>' doesn't work? Note that
both work with xedit so that there's no problem with Compose map. 

Am I missing something? Is there Gtk-built-in support for
a small set of combinations like 'Compose a e'? 
Comment 3 Owen Taylor 2002-10-17 15:41:58 UTC
- Xlib compose handling is a built in X input method
- In most locales, GTK+ doesn't use that, it uses (by default)
  GtkIMContextSimple, which has it's own compose tables.
  (Those tables are why compose ae works)
- Maybe things didn't work because you set
   XMODIFIERS=@im=myim 
  ? That would keep Xlib from using the built in compose method.
- You can also change input method on the fly to "X Input Method"
  through the right click menu.
Comment 4 Jungshik Shin 2002-10-17 16:21:54 UTC
That was it. Thank you.
By resetting XMODIFIERS, I was able to access
X11 compose mechanism in both en_US.UTF-8 and ko_KR.UTF-8. 
As for Gtk-built-in compose mechanism, wouldn't it be nice
to let users modify/change the built-in(compiled-in) table
for GtkIMContextSimple without recompiling Gtk? Another thing 
is that if XIM
specified via XMODIFIER variable fails to get loaded (when
users select XIM) it may be handy to fall back to Compose-map based XIM.