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: 26 Oct 2001 16:27:59 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1.50

David Monniaux <David.Monniaux@ens.fr> writes:

> Le Mercredi 24 Octobre 2001 11:59, Gerd Moellmann a écrit :
> 
> > Could you please apply this patch, and see if the abort is hit?
> 
> Emacs no longer segfaults, but lots of characters are still 
> misinterpreted:
> - OE, oe
> - Euro sign
> - some Russian letters (I temporarily switched my keyboard to Russian 
> to test it), but not all of them (!)
> 
> > *** xterm.c.~1.650.4.4.~    Wed Oct 24 11:15:47 2001
> > --- xterm.c Wed Oct 24 11:55:42 2001
> > ***************
> > *** 10606,10615 ****
> >                                                       modifiers);
> >                           bufp->timestamp = event.xkey.time;
> >                           bufp++;
> >                         }
> > -
> > -                     count += nchars;
> > -                     numchars -= nchars;
> >
> >                       if (keysym == NoSymbol)
> >                         break;
> > --- 10606,10616 ----
> >                                                       modifiers);
> >                           bufp->timestamp = event.xkey.time;
> >                           bufp++;
> > +                         ++count;
> > +                         --numchars;
> > +                         if (numchars < 0)
> > +                           abort ();
> >                         }
> >
> >                       if (keysym == NoSymbol)
> >                         break;

That it no longer crashes with this patch could mean that the number
of chars `nchars' returned by decode_coding above the code block in
the patch is different from the number of chars put into the input
buffer in the for loop, which is guided by the `nbytes' returned from
decode_coding.

I don't know how that can happen, it should be a bug somewhere.  Maybe
Kenichi can help out here.  What's the value of the variable
locale-coding-system?  That coding system should have been used for
decoding the input.



reply via email to

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