janlelis/unicode-display_width

String#display_width returns 1 for byte order mark

jonas054 opened this issue · 3 comments

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.

I'll research a way to deal with this an similar codepoints.

Fixed with 1.0.0: "\uFEFF".display_width #=> 0

👍 Thanks!