unicode-rs / unicode-width

Displayed width of Unicode characters and strings according to UAX#11 rules.
https://unicode-rs.github.io/unicode-width
Other
215 stars 27 forks source link

Remove soft hyphen special case #44

Closed Jules-Bertholet closed 6 months ago

Jules-Bertholet commented 6 months ago

Unicode unambiguously specifies that U+00AD SOFT HYPHEN, as a Default_Ignorable_Code_Point, should have no visible display by default. However, many terminal emulators do not implement the Unicode semantics, but instead implement the ISO Latin-1 semantics, which give the character a visible display (https://unicode.org/faq/casemap_charprop.html#18, https://archive.is/fCT3c).

Currently, this library implements the ISO Latin 1 semantics. This PR would switch to the Unicode semantics. Whether it should be merged, depends on what this purpose of this library is supposed to be.