wcwidth icon indicating copy to clipboard operation
wcwidth copied to clipboard

U+2064 to U+206f are 0 width, but wcwidth returns 1 width

Open charlie-collard opened this issue 6 years ago • 4 comments

base = ord('\u2064')
for i in range(12):
    print('A' + chr(base+i) + 'B')

charlie-collard avatar Feb 12 '19 16:02 charlie-collard

In iTerm2, these are all displayed as an empty space (1 cell wide), so wcwidth matches there. What terminal/s are you using that displays these as 0 wide? I will try some others given time

jquast avatar Jun 01 '20 17:06 jquast

From http://www.unicode.org/Public/13.0.0/ucd/extracted/DerivedGeneralCategory.txt

2060..2064    ; Cf #   [5] WORD JOINER..INVISIBLE PLUS

jquast avatar Jun 01 '20 17:06 jquast

This is still an issue, see the linked issue above.

tiptenbrink avatar Nov 09 '21 13:11 tiptenbrink

I will do my best to address this in next release, this is the FOSS project I most wish to volunteer my time into, I just pushed my WIP branch https://github.com/jquast/wcwidth/compare/use-jinja?expand=1#diff-a7a564eab7d7101276d9c63a7bc6505f4dc79188333295b7a3e62636862ac367R163-R165 as I hope I can then better generate code for other languages using jinja2 and get these issues fixed more universally.

But anyway I start a new job today, so that's life!

jquast avatar Nov 15 '21 15:11 jquast

This is closed in today's release by #91

jquast avatar Oct 30 '23 19:10 jquast