bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: utf-8 input under X11


From: Gerd Moellmann
Subject: Re: utf-8 input under X11
Date: 29 Oct 2001 10:47:10 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1.50

Kenichi Handa <address@hidden> writes:

> So, at least, the above line should be something like:
> 
> 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?

Thanks, Kenichi.  I've installed that change in RC and HEAD (diff
below).  Could you please try it David?

Index: xterm.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xterm.c,v
retrieving revision 1.672
diff -c -c -r1.672 xterm.c
*** xterm.c     2001/10/27 21:41:34     1.672
--- xterm.c     2001/10/29 09:42:59
***************
*** 10593,10600 ****
                             character events.  */
                          for (i = 0; i < nbytes; i += len)
                            {
!                             c = STRING_CHAR_AND_LENGTH (copy_bufptr + i,
!                                                         nbytes - i, len);
                              bufp->kind = (SINGLE_BYTE_CHAR_P (c)
                                            ? ascii_keystroke
                                            : multibyte_char_keystroke);
--- 10593,10604 ----
                             character events.  */
                          for (i = 0; i < nbytes; i += len)
                            {
!                             if (nchars == nbytes)
!                               c = copy_bufptr[i], len = 1;
!                             else
!                               c = STRING_CHAR_AND_LENGTH (copy_bufptr + i,
!                                                           nbytes - i, len);
!                             
                              bufp->kind = (SINGLE_BYTE_CHAR_P (c)
                                            ? ascii_keystroke
                                            : multibyte_char_keystroke);




reply via email to

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