From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15616 invoked from network); 24 Oct 2001 13:57:21 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 24 Oct 2001 13:57:21 -0000 Received: (qmail 20539 invoked by alias); 24 Oct 2001 13:57:13 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16131 Received: (qmail 20525 invoked from network); 24 Oct 2001 13:57:11 -0000 Date: Wed, 24 Oct 2001 09:57:02 -0400 From: Clint Adams To: Borsenkow Andrej Cc: "'Geoff Wing'" , "'Zsh Hackers'" Subject: Re: multibyte backwarddeletechar Message-ID: <20011024095702.A25268@dman.com> References: <20011022073231.B31806@dman.com> <000f01c15af1$68294d80$21c9ca95@mow.siemens.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <000f01c15af1$68294d80$21c9ca95@mow.siemens.ru>; from Andrej.Borsenkow@mow.siemens.ru on Mon, Oct 22, 2001 at 04:02:22PM +0400 > I am not sure I follow it. What you actually have to do is > > - on input: either get plain characters and convert them using btowc > (that is O.K. as starting point) or read multibyte stream with mb* > functions and convert them with mbtowc (that is needed as final result > to be able to deal with UTF-8 encoding finally). > - on output: use either wctob or wctomb. > > Looks like you did exactly opposite :-) Indeed. I suppose I expected fgetwc to be smarter than it is. wcwidth() seems to be a good answer to the ZLE line-width determining problem.