[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: |
Mon, 29 Oct 2001 11:14:17 +0200 |
CONGRATULATIONS KENICHI-SAN !
[xterm.c]
> thus the byte sequence returned by XmbLookupString is not
> decoded. But, in the for loop at line 10601, we have this
> code:
>
> for (i = 0; i < nbytes; i += len)
> {
> c = STRING_CHAR_AND_LENGTH (copy_bufptr + i,
> nbytes - i, len);
[replace it by:]
> if (nbytes == nchars)
> c = copy_bufptr[i], len = 1;
> else
> c = STRING_CHAR_AND_LENGTH (copy_bufptr + i, nbytes - i, len);
> Could you change the code as above, and try again without
> setting locale-coding-system to utf-8?
It just works, whether or not locale-coding-system is set to utf-8. I
nevertheless have to use encoded-keyboard (which I don't have to use
if I'm using ISO-8859-1 or KOI8 locales).
I guess that there remain some polishing touches :
1/ If running in an UTF-8 locale, Emacs should set automatically
locale-coding-system to utf-8, as it does for ISO-8859-1 (it sets the
variable to iso-latin-1).
2/ If locale-coding-system is utf-8, Emacs should decode keyboard
input as utf-8 (this looks like it has something to do with the code
around line 10573). I don't see why the user should have to do
something special (like set-keyboard-coding-system) if using utf-8,
but not if using koi8-r !
3/ The documentation for locale-coding-system should reflect this
role, since the current documentation only talks of "system messages".
> >> I now did experiments setting locale-coding-system to 'utf-8.
> >> The results are pretty much interesting. I don't have to
> >> (set-keyboard-coding-system 'utf-8)
> >> - <Multi_key o e> gives oe ligature (correct)
> >> - <Multi_key O E> gives oe ligature (correct)
> >> - <Multi_key E => gives the Euro sign (correct)
> >> - AltGr-E abandons instead of giving the Euro sign
> >> - the Russian characters give garbage
With your patch, it looks like everything works fine. I tried all the
above key combinations, they all work fine.
--
David Monniaux http://www.di.ens.fr/~monniaux
Laboratoire d'informatique de l'École Normale Supérieure,
Paris, France
Re: utf-8 input under X11, Kenichi Handa, 2001/10/27
Re: utf-8 input under X11, Kenichi Handa, 2001/10/28
Re: utf-8 input under X11, Kenichi Handa, 2001/10/28
Re: utf-8 input under X11, Gerd Moellmann, 2001/10/29