* Strange handling of multi-byte emoji / variation selector U+FE0E in ZLE
@ 2017-07-10 19:05 Elliott Cable
2017-07-13 15:28 ` Jun T.
0 siblings, 1 reply; 2+ messages in thread
From: Elliott Cable @ 2017-07-10 19:05 UTC (permalink / raw)
To: zsh-users
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/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Strange handling of multi-byte emoji / variation selector U+FE0E in ZLE
2017-07-10 19:05 Strange handling of multi-byte emoji / variation selector U+FE0E in ZLE Elliott Cable
@ 2017-07-13 15:28 ` Jun T.
0 siblings, 0 replies; 2+ messages in thread
From: Jun T. @ 2017-07-13 15:28 UTC (permalink / raw)
To: zsh-users
(re-posting to users list)
> 2017/07/11 04:05、Elliott Cable <me@ell.io> wrote,
> echo '☺' // echo -e '\u263A'
> echo '☺️' // echo -e '\u263A\uFE0F'
> echo '☺︎' // echo -e '\u263A\uFE0E'
> Unfortunately, when these are entered at the command-line, ZLE's
> character-count seems to get all wonky:
Could you please try the latest git master? About two months ago
We've added new Unicode-related functions to zsh, which correctly
recognize U+FF00 - U+FF0F as combining characters.
(The new functions are enabled by default on macOS)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-13 15:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-10 19:05 Strange handling of multi-byte emoji / variation selector U+FE0E in ZLE Elliott Cable
2017-07-13 15:28 ` 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).