Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: various weirdnesses with unicode support

Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> > > > > * Having zsh in utf-8 locale but the terminal inputting for example
> > > > > ISO-8859-1 makes zsh enter some weird state where
> > For example, this patch uses the existing $KEYTIMEOUT variable to time out
> > the remaining bytes of a multibyte character.  If mbrtowc() reported
> > there was more, but reading the next byte took more than $KEYTIMEOUT
> > hundredths of a second, the character is returned as a wide '?' and
> > the shift state for character input is reset.
> > 
> > Much of the patch is adding the extra argument to getbyte to differentiate
> > a real EOF from a timeout.
> > 
> > Does this help?  I suspect we probably need something like this anyway.
> It seems to help a bit. If i press å (a with a ring), and then press a
> a few times, zle still seems to be in a mostly normal state. But if i
> press several å in a row i can't seem to get out.

I've checked this in anyway, with some slight tweaks: the MB state is
also reset if getrestchar() returns EOF, and I've added zle documentation
indicating that $KEYTIMEOUT is applied to multibyte characters.

I won't be much use with debugging this since I have currently no way
of generating invalid characters.  X Windows is smart enough to convert
between windows.  There may be some way of confusing it with the locale
or character set.

Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.


Messages sorted by: Reverse Date, Date, Thread, Author