Skip to content

Instantly share code, notes, and snippets.

@aodag
Created February 3, 2022 01:27
Show Gist options
  • Save aodag/cc0c8665bb80bf9ce4369a419469dd17 to your computer and use it in GitHub Desktop.
Save aodag/cc0c8665bb80bf9ce4369a419469dd17 to your computer and use it in GitHub Desktop.
πŸ§‘β€πŸ€β€πŸ§‘
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')]
# 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