Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: multibyte backwarddeletechar



> 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.

For one thing, the %D escape in my prompt is substituted with
multibyte glyphs in the relevant locales.  That in itself
poses a potential width calculation problem even if the user
doesn't input any multibyte characters.

As for the command line:

--8<--snip--8<--
To delete a multi-byte character you have to press backspace multiple times.
Beside normal irritation this can lead to you feeding non-conformant utf8
streams into programs expecting conformant utf8.

Hard to explain. The following is probally totaly messed up but I'm trying
to pipe the single letter 'latin small letter a with ring above' which is
0xE5 in iso8859-1 into od -x. The first time I get the real letter on the
command line and everything seems ok. The second time I get the right letter
on the command line and press backspace once before continuing with '|'.

plugh% echo -n å| od -x
0000000 a5c3
0000002
plugh% echo -n | od -x 
0000000 00c3
0000001
plugh% 



Messages sorted by: Reverse Date, Date, Thread, Author