You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I read this post and found that segmentation over this emoji is wrong due to new rule of ZERO WIDTH JOINER. Concerning I have only little knowledge about Unicode, is there anything I can help?
use unicode_segmentation::UnicodeSegmentation;fnmain(){let s = "🤦🏼♂️";println!("{}", s.graphemes(true).count());println!("{}", s.chars().count());println!("{}", s.encode_utf16().count());println!("{}", s.len());}// 2 <---- should be 1// 5// 7// 17
The text was updated successfully, but these errors were encountered:
I read this post and found that segmentation over this emoji is wrong due to new rule of ZERO WIDTH JOINER. Concerning I have only little knowledge about Unicode, is there anything I can help?
Reproducible Demo
Playground Link
The text was updated successfully, but these errors were encountered: