From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4530 invoked from network); 22 Oct 2001 00:57:13 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 22 Oct 2001 00:57:13 -0000 Received: (qmail 5185 invoked by alias); 22 Oct 2001 00:57:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16097 Received: (qmail 5169 invoked from network); 22 Oct 2001 00:57:06 -0000 Date: Mon, 22 Oct 2001 10:57:02 +1000 From: Geoff Wing To: Zsh Hackers Subject: Re: multibyte backwarddeletechar Message-ID: <20011022105702.A4297@primenet.com.au> References: <20011021114254.A17952@dman.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011021114254.A17952@dman.com>; from clint@zsh.org on Sun, Oct 21, 2001 at 03:43:08PM +0000 Organization: PrimeNet Computer Consultancy Clint Adams typed: :I don't intend to commit this patch as-is. :This causes backward-delete-char to delete entire :multibyte characters (valid in the current locale) :rather than their component octets. Except that the ZLE refresh code can't handle it. The code only sees single characters and won't pass multibyte characters through to the underlying terminal properly. Background info for everyone: terminal emulators (I say "terminal emulators" because I don't know of any terminals which can handle multibyte glyphs but there may be some around) need multibyte glyphs to be passed through atomically (considering only the character stream) otherwise the terminal emulator can't know what constitutes part of a glyph and what doesn't. In common multibyte languages, this means that pairs of characters (representing one glyph two characters wide) must be passed through in sequence. The ZLE refresh code quite happily writes the second half of multibyte glyphs through out of context (i.e. without the first half) which would corrupt terminal emulator displays. My first thought is whether it is meaningful to use multibyte glyphs on the command line. And it may well be if, say, people name files using multibyte glyphs and other programs (e.g. ls) display those names. My second is whether we truly want to handle multibyte glyphs. I don't think minihacks will work. It may be a major overhaul. Not just the ZLE refresh code would need updating but other areas too. Of course, it may not be as much work as I think but would definitely need some discussion about what should and should not be handled. Regards, -- Geoff Wing | gcw@pobox.com | gcw@rxvt.org | gcw@zsh.org