[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: utf-8 input under X11

From: David Monniaux
Subject: Re: utf-8 input under X11
Date: Tue, 23 Oct 2001 15:10:27 +0200

Le Mardi 23 Octobre 2001 14:32, Eli Zaretskii a écrit :
> Really?  On my system, "C-x RET k utf-8 RET" turns on the
> Encoded-kbd mode.  Don't you see "Encoded Kbd" in the mode line?

I meant that I tried without any init file and to hit Euro (EuroSign 
keysym) as the first keystroke, it crashed.

I also tried running Emacs without any init file and putting it into 
Encoded Kbd mode (using the above sequence), it also crashed when I 
then typed the Euro sign.

It looks like the problem has to do with the X11 part of Emacs. I 
have no problem typing the Euro sign if I run emacs -nw inside an 
UTF-8 xterm using Encoded Kbd.

> I'm confused: you've just said that no keysyms are transmitted, but
> then you say that input keysyms are translated into a string?

Well, the X server does indeed transmit keysyms, but they are not 
"Unicode keysyms". There are actually two kind of things going on :

- When I want the OE ligature, I type the keysym sequence <Multi_key 
O E> [1]. Then a function inside the Xlib translates those keysyms, 
according to a "Compose table" whose choice is locale-dependent, into 
the UTF-8 sequence corresponding to the Unicode character number 
Similarly, <Multi_key E => gives the UTF-8 sequence corresponding to 
the Euro character in Unicode.

The "Compose table" also handles "dead keys" such as dead_circumflex 
(you may have never heard about them if you have never seen a French 
or German keyboard). If you want to test that feature of the 
keyboard, run in an ISO-8859-1 locale and hit <Multi_key ' e>, you 
should get a "e acute".

- Alternatively, there exists an EuroSign keysym (bound to AltGr-E on 
this machine). 

The point is that regardless the method of input (<Multi_key E => or 
<EuroSign> keysym sequences), Emacs crashes.

[1] Multi_key is the keysym bound to the "Compose" key on Sun 
keyboards. Very often, on Linux PCs using 104 or 105 key keyboards, 
one of the Microsoft keys is bound to Multi_key.

[2] Have a look inside /usr/X11R6/lib/X11/locale/iso8859-1/Compose or 
 /usr/X11R6/lib/X11/locale/mk_MK.UTF-8/Compose for instance.

> When Emacs is set up for utf-8 keyboard encoding, it expects a
> UTF-8 stream of codes, not a keysym.

As I said before, I don't think all those problems have ANYTHING to 
do with the UTF-8 decoding of Emacs, but rather in the X11-related 
parts of Emacs.

> Do you maybe have an X input method enabled or something?

No. The Compose mechanism does not involve any X input method.

David Monniaux            http://www.di.ens.fr/~monniaux
Laboratoire d'informatique de l'École Normale Supérieure,
Paris, France

reply via email to

[Prev in Thread] Current Thread [Next in Thread]