zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Alexandre ZANNI <alexandre@acceis.fr>, zsh-workers@zsh.org
Subject: Re: Unicode ZWJ sequence
Date: Sat, 19 Aug 2023 18:46:39 +0200	[thread overview]
Message-ID: <CAHYJk3S1Oa_9eFPhdWM-ma+F9=485XqMO7iRHr8L4Z7hMNWKpA@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7aAg_TGwgpJhGaniYOAG0yrhSye9GK3x75m5=BnLmhdLg@mail.gmail.com>

On 8/19/23, Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Fri, Aug 18, 2023 at 8:24 AM Mikael Magnusson <mikachu@gmail.com> wrote:
>>
>> On 8/18/23, Alexandre ZANNI <alexandre@acceis.fr> wrote:
>> >
>> > TL;DR: zsh is not handling Unicode ZWJ (Zero Width Joiner) sequence.
>> >
>> > "👩‍❤️‍👨" (that will probably not render here) is a Unicode grapheme
> [...]
>> > Is this problem already known?
>>
>> It's actually not possible to display these emojis in a terminal
>
> "Display" isn't quite the correct word here.  "Edit" rather.
>
> If you disable the "zle" option, you'll see the grapheme.

Well, I wasn't even really talking about zsh specifically, but I
suppose if you don't care where any text ends up on the screen then
yes, you can display them.

That said, if you want randomly corrupted listings you can setopt
combiningchars and zsh will output even ZWJ directly to the terminal.

(I have a vague memory I argued against this at some point in the past
since combining characters are deterministic but emojis are not, it
presumably never went anywhere though.

 It feels like the most correct thing to do is to not output ZWJ at
all when combiningchars is on, since then we know the terminal will
not combine emojis and we know where everything is. (Barring some
other mechanism for the terminal to give a wcwidth-like thing for
emoji combinations to the program running inside which seems on the
far end of the "not really worth it" scale.))

-- 
Mikael Magnusson


  reply	other threads:[~2023-08-19 16:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18 13:02 Alexandre ZANNI
2023-08-18 15:24 ` Mikael Magnusson
2023-08-19 16:16   ` Bart Schaefer
2023-08-19 16:46     ` Mikael Magnusson [this message]
2023-08-19 17:07       ` Bart Schaefer
2023-08-19 17:11         ` Bart Schaefer
2023-08-19 15:53 ` Roman Perepelitsa
2023-08-19 17:11   ` Wesley Schwengle
2023-08-20  0:06     ` maxbeckie
2023-08-20  0:13       ` Lawrence Velázquez

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='CAHYJk3S1Oa_9eFPhdWM-ma+F9=485XqMO7iRHr8L4Z7hMNWKpA@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --cc=alexandre@acceis.fr \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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).