Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Strange handling of multi-byte emoji / variation selector U+FE0E in ZLE
- X-seq: zsh-users 22777
- From: Elliott Cable <me@xxxxxx>
- To: "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Subject: Strange handling of multi-byte emoji / variation selector U+FE0E in ZLE
- Date: Mon, 10 Jul 2017 14:05:43 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ell.io; s=google; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=QhLBaoAM2zkgfa4eLacJXJOpm9T/e2it607xJfvCDnQ=; b=EhV8vQtLqs8US4NCPFXTblHTLqAFoFJ69aEQPMbHwnq2YaU8NOHJpJM4uYAric5Kvq v8FuOj+KZ8nXdkSP2ISU/BVGBEx0a5YalfgvBdwn5/G40X50NBZI/P0aqeCkk9lykYoo u5+RcXk3LeGvgCvjp51YHKM9m0xD33OrBFULc=
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hi!
When entering emoji or Unicode glyphs on macOS, the selected glyph is
often inserted with a [Unicode 6.0 ‘variation selector’][1]. This
appears as two Unicode codepoints:
echo '☺' // echo -e '\u263A'
echo '☺️' // echo -e '\u263A\uFE0F'
echo '☺︎' // echo -e '\u263A\uFE0E'
(Those may appear differently in your e-mail client, of course — and
that's assuming *my* Gmail web-interface doesn't mangle them in the
sending ... so be careful as to how you interpret them: the first is
undeclared, the second should be a colourful emoji, and the last should
be an old-school, monochrome Unicode smiley glyph.)
Unfortunately, when these are entered at the command-line, ZLE's
character-count seems to get all wonky: rendering of the text entered so
far gets offset by one, backspacing behaves strangely, so-on and so-
forth.
I've reproduced this on two machines (though both macOS), in two
terminals (Terminal.app and Hyper.app), and on a couple recent zsh
versions.
Let me know if I should report this elsewhere, or if more debugging
information would be useful.
<U+1F61A> 😚!
[1]: http://mts.io/2015/04/21/unicode-symbol-render-text-emoji/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author