String#display_width returns 1 for byte order mark
jonas054 opened this issue · 3 comments
jonas054 commented
For a UTF-8 encoded BOM (codepoint U+FEFF) "\xef\xbb\xbf".display_width
returns 1
. I expect it to be 0
as it is an invisible character.
janlelis commented
I'll research a way to deal with this an similar codepoints.
janlelis commented
Fixed with 1.0.0: "\uFEFF".display_width #=> 0
jonas054 commented