Fix soft hyphens not being preserved when round tripping text through the terminal
Also roundtrip all characters in the Cf category. Characters with the DI (Default Ignorable) property are now preserved but not rendered and treated as zero-width as per the unicode standard. See https://www.unicode.org/faq/unsup_char.html
This commit is contained in:
@@ -369,6 +369,7 @@ class TestDataTypes(BaseTest):
|
||||
self.ae(wcswidth('\U0001F1E6a\U0001F1E8a'), 6)
|
||||
self.ae(wcswidth('\U0001F1E6\U0001F1E8a'), 3)
|
||||
self.ae(wcswidth('\U0001F1E6\U0001F1E8\U0001F1E6'), 4)
|
||||
self.ae(wcswidth('a\u00adb'), 2)
|
||||
# Regional indicator symbols (unicode flags) are defined as having
|
||||
# Emoji_Presentation so must have width 2
|
||||
self.ae(tuple(map(w, '\U0001f1ee\U0001f1f3')), (2, 2))
|
||||
|
||||
Reference in New Issue
Block a user