From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9552 invoked from network); 10 Feb 2005 15:06:49 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 10 Feb 2005 15:06:49 -0000 Received: (qmail 25985 invoked from network); 10 Feb 2005 15:06:39 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 10 Feb 2005 15:06:39 -0000 Received: (qmail 12920 invoked by alias); 10 Feb 2005 15:06:36 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20805 Received: (qmail 12907 invoked from network); 10 Feb 2005 15:06:35 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 10 Feb 2005 15:06:35 -0000 Received: (qmail 25670 invoked from network); 10 Feb 2005 15:06:35 -0000 Received: from mailhost1.csr.com (HELO MAILSWEEPER01.csr.com) (81.105.217.43) by a.mx.sunsite.dk with SMTP; 10 Feb 2005 15:06:14 -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 ; Thu, 10 Feb 2005 15:04:47 +0000 Received: from news01.csr.com ([10.103.143.38]) by exchange03.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 10 Feb 2005 15:06:36 +0000 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.1/8.12.11) with ESMTP id j1AF6Do4006568 for ; Thu, 10 Feb 2005 15:06:13 GMT Received: from csr.com (pws@localhost) by news01.csr.com (8.13.1/8.13.1/Submit) with ESMTP id j1AF6DUt006565 for ; Thu, 10 Feb 2005 15:06:13 GMT Message-Id: <200502101506.j1AF6DUt006565@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: Zsh hackers list Subject: Re: UTF-8 input [was Re: PATCH: zle_params.c] In-reply-to: <1050210145119.ZM22337@candle.brasslantern.com> References: <200501261806.j0QI6Q2d021854@news01.csr.com> <20050129034740.GA21742@scowler.net> <20050130010754.6F985863A@pwstephenson.fsnet.co.uk> <1050130063525.ZM24312@candle.brasslantern.com> <200502101422.j1AEM3Zx005978@news01.csr.com> <1050210145119.ZM22337@candle.brasslantern.com> Date: Thu, 10 Feb 2005 15:06:12 +0000 From: Peter Stephenson X-OriginalArrivalTime: 10 Feb 2005 15:06:36.0505 (UTC) FILETIME=[1D807490:01C50F82] X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.5 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.5 Bart Schaefer wrote: > So if, for example, I do > > BUFFER="$LBUFFER$KEYS$RBUFFER" > > this is going to convert LBUFFER and RBUFFER from wide chars to metafied > on expansion, and then convert the whole quoted string back to wide chars > upon assignment? Yes, the ZLE parameter interface is responsible for the conversion of the bits of the buffer in both directions, and, as it happens, $KEYS doesn't need converting. > } I suspect we will want a flag such as ${(m)#KEYS} to treat the string > } as a multibyte character string instead of raw bytes and maybe a > } ${(M)#KEYS} not to. > > (M) is already taken, as are (w) and (W). I missed that, but maybe we don't need it if the default is raw bytes. > I presume you mean (m) to be like (c) in that it works only with ${#...}. > Otherwise I'm even more confused. Well, it would be anywhere the distinction made sense, but counting lengths is the only obvious one. Anywhere involving pattern matching would need to go with the locale, I would think; anything else is too horrendous to contemplate. > } [...] argue for it to handle multibyte strings by default in a suitable > } locale, but when Perl did that it broke everything in sight. > > I'm not arguing for that ... if anything, I'm arguing against it. Compatibility with other shells would be the only good reason I can see, but that could be an option. There are plenty of do_something_done_by_other_shells_however_idiotic options. -- 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. **********************************************************************