From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4836 invoked from network); 9 Sep 2005 11:53:59 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 9 Sep 2005 11:53:59 -0000 Received: (qmail 17208 invoked from network); 9 Sep 2005 11:53:52 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 9 Sep 2005 11:53:52 -0000 Received: (qmail 13744 invoked by alias); 9 Sep 2005 11:53:49 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21713 Received: (qmail 13735 invoked from network); 9 Sep 2005 11:53:49 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 9 Sep 2005 11:53:49 -0000 Received: (qmail 16887 invoked from network); 9 Sep 2005 11:53:49 -0000 Received: from mailhost1.csr.com (HELO MAILSWEEPER01.csr.com) (81.105.217.43) by a.mx.sunsite.dk with SMTP; 9 Sep 2005 11:53:43 -0000 Received: from exchange03.csr.com (unverified [10.100.137.60]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Fri, 9 Sep 2005 12:51:25 +0100 Received: from news01 ([10.103.143.38]) by exchange03.csr.com with Microsoft SMTPSVC (5.0.2195.6713); Fri, 9 Sep 2005 12:54:47 +0100 Date: Fri, 9 Sep 2005 12:53:41 +0100 From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: various weirdnesses with unicode support Message-Id: <20050909125341.12a21423.pws@csr.com> In-Reply-To: <237967ef0509080731646f7306@mail.gmail.com> References: <237967ef05090713304637c1f1@mail.gmail.com> <20050908085533.GA2463@fargo> <200509081002.j88A215f024377@news01.csr.com> <20050908113246.52522e05.pws@csr.com> <237967ef0509080731646f7306@mail.gmail.com> Organization: Cambridge Silicon Radio X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-OriginalArrivalTime: 09 Sep 2005 11:54:47.0718 (UTC) FILETIME=[46E42C60:01C5B535] X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 Mikael Magnusson wrote: > > > > > * Having zsh in utf-8 locale but the terminal inputting for examp= le > > > > > 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. > >=20 > > Much of the patch is adding the extra argument to getbyte to differenti= ate > > a real EOF from a timeout. > >=20 > > Does this help? I suspect we probably need something like this anyway. >=20 > It seems to help a bit. If i press =E5 (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 =E5 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. --=20 Peter Stephenson 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. **********************************************************************