From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24199 invoked by alias); 26 Mar 2010 09:54:22 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27833 Received: (qmail 15137 invoked from network); 26 Mar 2010 09:54:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Message-Id: <201003260953.o2Q9rwAq007323@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: Zsh hackers list Subject: Re: PATCH: count glyphs in multibyte strings In-reply-to: <20100326010259.GA68432@redoubt.spodhuis.org> References: <22950.1269552903@pws-pc> <20100326010259.GA68432@redoubt.spodhuis.org> Comments: In-reply-to Phil Pennock message dated "Thu, 25 Mar 2010 18:02:59 -0700." Date: Fri, 26 Mar 2010 09:53:58 +0000 From: Peter Stephenson X-OriginalArrivalTime: 26 Mar 2010 09:54:00.0879 (UTC) FILETIME=[42BF8BF0:01CACCCA] Content-Type: text/plain MIME-Version: 1.0 X-Scanned-By: MailControl A_09_30_00 (www.mailcontrol.com) on 10.71.0.139 Phil Pennock wrote: > On 2010-03-25 at 21:35 +0000, Peter Stephenson wrote: > > I noticed we were missing this capability; not sure how useful it is in > > practice, but it was straightforward to add. > > > > You might want to check my terminology and assumptions about the way > > Unicode works aren't gibberish. > > What about -1 being returned from wcwidth() for non-printable > characters? Looks like this is an existing issue. Yes, it would make a mess of the existing code although the new capability would handle it better. I'm not sure whether the right answer is 1 or 0, but it's not -1. -- Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom