Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Unicode ZWJ sequence
- X-seq: zsh-workers 52065
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Cc: Alexandre ZANNI <alexandre@xxxxxxxxx>, zsh-workers@xxxxxxx
- Subject: Re: Unicode ZWJ sequence
- Date: Sat, 19 Aug 2023 10:07:52 -0700
- Archived-at: <https://zsh.org/workers/52065>
- In-reply-to: <CAHYJk3S1Oa_9eFPhdWM-ma+F9=485XqMO7iRHr8L4Z7hMNWKpA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <3777545.kQq0lBPeGt@norarch> <CAHYJk3Rh08Jw0KR==N6ibgZ3XeTx-6LqL2dG_G3hfBCYaWGLaQ@mail.gmail.com> <CAH+w=7aAg_TGwgpJhGaniYOAG0yrhSye9GK3x75m5=BnLmhdLg@mail.gmail.com> <CAHYJk3S1Oa_9eFPhdWM-ma+F9=485XqMO7iRHr8L4Z7hMNWKpA@mail.gmail.com>
On Sat, Aug 19, 2023 at 9:46 AM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>
> 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.
In this case he's got a terminal emulator that is able to display the
grapheme, and in fact as the output of "echo" it works fine, it's only
on the command line that zsh is behaving differently -- and that's
because zle understands the potential problems you described and does
what it can to avoid them.
> That said, if you want randomly corrupted listings you can setopt
> combiningchars and zsh will output even ZWJ directly to the terminal.
It doesn't, though -- even with combiningchars you don't get the
joins, you just get the red heart:
% echo "👩<200d>❤<fe0f><200d>👨"
👩❤️👨
% setopt combiningchars
% echo "👩<200d>❤️<200d>👨"
👩❤️👨
%
> (I have a vague memory I argued against this at some point in the past
I think you may have prevailed.
I any event we're not talking about output in the stdout sense here,
we're talking about what zle has in the editor buffer after it gets
terminal input.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author