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

UNICODE Private Use Area characters in BUFFER



Zle cannot display UNICODE Private Use Area characters in BUFFER.

    % f() BUFFER=$'\uE0B0'
    % zle -N f
    % bindkey '^T' f
    % <Ctrl-T>

Expected: the last line shows the glyph for U+E0B0 (whichever way the terminal chooses to render it).

Actual: the last line shows <b0> in reverse video.

I haven't looked at the code but my guess is that zle assumes that characters from Private Use Area never have a native reasonable representation, so it attempts to show codepoints. This assumption is incorrect. I think Private Use Area characters shouldn't be handled specially. If there is no glyph in the terminal's font for a character, let the terminal decide how to present that.

Note: Private Use Area characters work fine everywhere else. For example, in PS1.

Roman.


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