Skip to content

Instantly share code, notes, and snippets.

@hoffa
Last active December 2, 2020 21:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hoffa/c965029aa6f8ba003d276ee75cec9ad1 to your computer and use it in GitHub Desktop.
Save hoffa/c965029aa6f8ba003d276ee75cec9ad1 to your computer and use it in GitHub Desktop.
import sys
import unicodedata
for c in sys.stdin.read():
utf8 = c.encode("utf-8").hex().upper()
code_point = ord(c)
name = unicodedata.name(c, "")
print(f"{c}\t0x{utf8}\tU+{code_point:04X}\t{name}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment