zsh-workers
 help / color / mirror / code / Atom feed
* UNICODE Private Use Area characters in BUFFER
@ 2022-10-23 10:12 Roman Perepelitsa
  2022-10-23 16:29 ` Mikael Magnusson
  0 siblings, 1 reply; 23+ messages in thread
From: Roman Perepelitsa @ 2022-10-23 10:12 UTC (permalink / raw)
  To: Zsh hackers list

[-- Attachment #1: Type: text/plain, Size: 778 bytes --]

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.

[-- Attachment #2: Type: text/html, Size: 1021 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2022-11-04 15:32 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-23 10:12 UNICODE Private Use Area characters in BUFFER Roman Perepelitsa
2022-10-23 16:29 ` Mikael Magnusson
2022-10-23 16:43   ` Roman Perepelitsa
2022-10-23 17:02     ` Bart Schaefer
2022-10-23 17:29       ` Roman Perepelitsa
2022-10-23 18:30         ` Unicode9 (was Re: UNICODE Private Use Area characters in BUFFER) Bart Schaefer
2022-10-23 19:30           ` Roman Perepelitsa
2022-10-23 21:57           ` Mikael Magnusson
2022-10-23 18:54         ` UNICODE Private Use Area characters in BUFFER Bart Schaefer
2022-10-23 19:26           ` Roman Perepelitsa
2022-11-04  9:55         ` Jun T
2022-10-23 22:42     ` Mikael Magnusson
2022-10-23 23:16       ` Roman Perepelitsa
2022-10-23 23:35         ` Bart Schaefer
2022-10-23 23:46           ` Bart Schaefer
2022-10-24  1:27             ` Mikael Magnusson
2022-10-24  1:43               ` Bart Schaefer
2022-10-24 10:50                 ` Roman Perepelitsa
2022-11-04 10:31                   ` Jun T
2022-11-04 10:33                     ` Roman Perepelitsa
2022-11-04 11:06                       ` Jun T
2022-11-04 11:09                         ` Roman Perepelitsa
2022-11-04 15:32                           ` Jun T

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