wcwidth
wcwidth copied to clipboard
U+2064 to U+206f are 0 width, but wcwidth returns 1 width
base = ord('\u2064')
for i in range(12):
print('A' + chr(base+i) + 'B')
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
From http://www.unicode.org/Public/13.0.0/ucd/extracted/DerivedGeneralCategory.txt
2060..2064 ; Cf # [5] WORD JOINER..INVISIBLE PLUS
This is still an issue, see the linked issue above.
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!
This is closed in today's release by #91