You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
wcswidth incorrect for heart emoji, ❤️ ("\u2764\ufe0f") #96
In this case, the first character "\u2764" (❤) is a width of 1, but is then cojoined with a second character, variation selector "\ufe0f" which then modifies the cell length of the first character to 2.
We don't have any code in wcwidth to detect this special kind of combining, this might be like the Devanagari issue #47, that "combiner may sometimes increase the width of the previous cell, depending on its value"
Activity
[-]wcswidth incorrect for heart emoji ("❤️")[/-][+]wcswidth incorrect for heart emoji, ❤️ ("\u2764\ufe0f")[/+]jquast commentedon Oct 31, 2023
In this case, the first character "\u2764" (❤) is a width of 1, but is then cojoined with a second character, variation selector "\ufe0f" which then modifies the cell length of the first character to 2.
We don't have any code in wcwidth to detect this special kind of combining, this might be like the Devanagari issue #47, that "combiner may sometimes increase the width of the previous cell, depending on its value"
jquast commentedon Oct 31, 2023
this sequence is in https://www.unicode.org/Public/UCD/latest/ucd/emoji/emoji-variation-sequences.txt which doesn't seem to hint about this width modification, but maybe it could be used to test for and make a "narrow to wide variations" table of sorts.
jquast commentedon Nov 7, 2023
I have created a solution in #97, I am now testing it with popular terminals, thanks again for the bug report
Bugfix accounting for Variation Selector 16
Bugfix accounting for Variation Selector 16 (#97)
jquast commentedon Nov 13, 2023
This fix will be soon released in version 0.2.10. I also tested many terminals for VS16 support, only about 28% of those tested support any kind of VS-16 sequence. https://ucs-detect.readthedocs.io/results.html