Zsh Mailing List Archive
Messages sorted by:
Re: multibyte backwarddeletechar
- X-seq: zsh-workers 16097
- From: Geoff Wing <gcw@xxxxxxx>
- To: Zsh Hackers <zsh-workers@xxxxxxxxxx>
- Subject: Re: multibyte backwarddeletechar
- Date: Mon, 22 Oct 2001 10:57:02 +1000
- In-reply-to: <20011021114254.A17952@xxxxxxxx>; from clint@xxxxxxx on Sun, Oct 21, 2001 at 03:43:08PM +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Organization: PrimeNet Computer Consultancy
- References: <20011021114254.A17952@xxxxxxxx>
Clint Adams <clint@xxxxxxx> 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.
Geoff Wing | gcw@xxxxxxxxx | gcw@xxxxxxxx | gcw@xxxxxxx
Messages sorted by: