Subject: bug#48125: 28.0.50; Display garbled by emoji variation sequence

From: Filipp Gunbin <[email-masked]>
Date: Fri, 30 Apr 2021 19:20:12 +0300

emacs -Q

Enter a base emoji char and composing variation selector right after it:

C-x 8 RET SOCCER BALL
C-x 8 RET VARIATION SELECTOR-16

Then, for example:
C-a a s d f

And the display becomes garbled.

When auto-composition is turned off (M-x toggle-auto-composition),
everything is fine.

The above sequence is a real text which I got in an email header.  It
seems to be a valid variation sequence:

http://www.unicode.org/Public/emoji/5.0/emoji-variation-sequences.txt

...
26BD FE0E  ; text style;  # (5.2) SOCCER BALL
26BD FE0F  ; emoji style; # (5.2) SOCCER BALL
...

This is in tty emacs, built from latest master, on macOS.

Thanks.

In GNU Emacs 28.0.50 (build 4, x86_64-apple-darwin20.3.0, NS appkit-2022.30 Version 11.2.3 (Build 20D91))
 of 2021-04-30 built on fgunbin.local
System Description:  macOS 11.2.3

Configured features:
ACL GLIB GNUTLS LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG RSVG
THREADS TOOLKIT_SCROLL_BARS XIM ZLIB