[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1123509: xterm: various issues with the U+FE0F VARIATION SELECTOR-16 (VS16) character after emoji



xterm 406 fixed the default. But VS16 support "xterm -emoji_width" is
still buggy.

On 2025-12-17 04:50:45 +0100, Vincent Lefevre wrote:
> But there are issues even with simple output. In a 80-column terminal:
> 
>   perl -C -e 'print "\x{2642}\x{FE0F}"x60, "\n"'
> 
> I get "♂♂" in the last two columns, which is inconsistent with what
> is output before. And in case of scrolling, the spaces are missing
> in the second line.

There's still "♂♂" in the last two columns. The scrolling issue
is not longer present.

> And selection/deselection of such output gives random behavior.

This is still buggy, in a different way: a triple-click yields
some spaces in normal video, while everything should be in
reverse video. And deselecting sometimes leaves a space in
reverse video.

In bash, editing text with an emoji + VS16 is completely broken
with "xterm -emoji_width". For instance, consider

------------------------------------------------------------------
vinc17@qaa:~$ unicode '♂️'
U+2642 MALE SIGN
UTF-8: e2 99 82 UTF-16BE: 2642 Decimal: ♂ Octal: \023102
♂
Category: So (Symbol, Other); East Asian width: A (ambiguous)
Unicode block: 2600..26FF; Miscellaneous Symbols
Bidi: ON (Other Neutrals)
Age: Assigned as of Unicode 1.1.0 (June, 1993)

U+FE0F VARIATION SELECTOR-16
UTF-8: ef b8 8f UTF-16BE: fe0f Decimal: ️ Octal: \0177017

Category: Mn (Mark, Non-Spacing); East Asian width: A (ambiguous)
Unicode block: FE00..FE0F; Variation Selectors
Bidi: NSM (Non-Spacing Mark)
Age: Newly assigned in Unicode 3.2.0 (March, 2002)
------------------------------------------------------------------

Now type a sequence of <Up> and <Down>. Each time <Down> is typed,
an additional "u" is left in the terminal (but the actual bash
command line is empty). For instance:

vinc17@qaa:~$ uuuuuuuunicode '♂️ '

Also, typing <Left> and <BackSpace> gives

vinc17@qaa:~$ unicode '♂️'

in the xterm, but the actual command line is

vinc17@qaa:~$ unicode ''

(with nothing between the quotes).

There is no such issue in xterm without -emoji_width or in
GNOME Terminal.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)


Reply to: