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

Re: UNICODE Private Use Area characters in BUFFER



Sorry, this is not related with the Roman's original problem
(so can be ignored if you do not use East Asian Ambiguous Width chars).

> 2022/11/04 20:09, Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx> wrote:
> 
> Perhaps zsh should have a similar option? Currently, if the terminal
> option is switched on, prompt will break if it includes private use
> area chars.

It is not a problem of zsh. iTerm2 (and other terminals) uses the option
to control the width of both "East Asian Ambiguous Width" and "User Area"
characters (and maybe other characters with ambiguous width). If your
"User Area" characters are all single width, and if you do not use East
Asian ambig. chars, then you are fine just by unsetting the option
(aside from the problem that Zle can't use them).

If you want to use the East Asian ambig. chars (with CJK fonts) then
you need to set the option on to display them correctly (double width),
but zsh (and probably bash/readline) assume them to be single width
(since wcwidth() returns 1) and can't edit them correctly.

This is a well known problem among Japanese (and Chinese/Korean?)
users. But the problem is in wcwidth (or locale definition), and
I think we need not fix it in zsh.




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