zsh-workers
 help / color / mirror / code / Atom feed
From: Geoff Wing <gcw@zsh.org>
To: Zsh Hackers <zsh-workers@sunsite.dk>
Subject: Re: multibyte backwarddeletechar
Date: Mon, 22 Oct 2001 10:57:02 +1000	[thread overview]
Message-ID: <20011022105702.A4297@primenet.com.au> (raw)
In-Reply-To: <20011021114254.A17952@dman.com>; from clint@zsh.org on Sun, Oct 21, 2001 at 03:43:08PM +0000

Clint Adams <clint@zsh.org> 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


  parent reply	other threads:[~2001-10-22  0:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-21 15:42 Clint Adams
2001-10-21 17:13 ` Bart Schaefer
2001-10-21 18:21   ` Clint Adams
2001-10-22  0:57 ` Geoff Wing [this message]
2001-10-22  1:50   ` Clint Adams
2001-10-22  3:23     ` Geoff Wing
2001-10-22 11:27       ` Clint Adams
2001-10-22  5:20   ` Borsenkow Andrej
2001-10-22 11:32     ` Clint Adams
2001-10-22 12:02       ` Borsenkow Andrej
2001-10-24 13:57         ` Clint Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011022105702.A4297@primenet.com.au \
    --to=gcw@zsh.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).