Skip to content

Instantly share code, notes, and snippets.

@s4mdf0o1
Last active November 1, 2015 16:43
Show Gist options
  • Save s4mdf0o1/148397940b2bed54c86b to your computer and use it in GitHub Desktop.
Save s4mdf0o1/148397940b2bed54c86b to your computer and use it in GitHub Desktop.
Generate the utf-8 symbols with Python3, so you can '$ grep FACE utf8.list'
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unicodedata
u=""
name=""
line=""
for i in range(65000):
u+=chr(i)
with open("utf8.list", 'w') as ul:
for i,c in enumerate(u):
try:
name=unicodedata.name(c)
line=str(i) + " - " + c + " - " + name + "\n"
except:
print("Missed :", i)
ul.write(line)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment