Created
February 3, 2022 01:27
-
-
Save aodag/cc0c8665bb80bf9ce4369a419469dd17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
π§βπ€βπ§ | |
5 | |
1 | |
b'\xf0\x9f\xa7\x91\xe2\x80\x8d\xf0\x9f\xa4\x9d\xe2\x80\x8d\xf0\x9f\xa7\x91' | |
[('π§', 'ADULT'), ('\u200d', 'ZERO WIDTH JOINER'), ('π€', 'HANDSHAKE'), ('\u200d', 'ZERO WIDTH JOINER'), ('π§', 'ADULT')] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# U+1F9D1 U+200D U+1F91D U+200D U+1F9D1 | |
import unicodedata | |
import grapheme | |
u = "\U0001F9D1\u200D\U0001F91D\u200D\U0001F9D1" | |
# u = "π§βπ€βπ§" | |
print(u) | |
print(len(u)) | |
print(grapheme.length(u)) | |
print(u.encode('utf8')) | |
print([(n, unicodedata.name(n)) for n in u]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment