wcwidth icon indicating copy to clipboard operation
wcwidth copied to clipboard

Wrong width for the zero width no-break space (ZWNBSP) or byte order mark (BOM) character u+feff.

Open edward-dauvergne opened this issue 8 years ago • 1 comments

Hopefully this is enough to reproduce:

>>> import wcwidth
>>> a = u"3\ufeff4"
>>> wcwidth.wcswidth(a)
3
>>> a
'3\ufeff4'
>>> print(a)
34
>>>

Rather than:

>>> wcwidth.wcwidth(u'\ufeff')
1

I would expect:

>>> wcwidth.wcwidth(u'\ufeff')
0

edward-dauvergne avatar Feb 03 '17 20:02 edward-dauvergne

This is enough information, I hope to fix this after consulting unicode specification regarding this character.

jquast avatar Feb 11 '17 00:02 jquast

This is resolved in today's release, sorry for the long turnaround

jquast avatar Oct 30 '23 19:10 jquast