updated contents from Atlas repo
This commit is contained in:
15
strings-bytes/category_demo.py
Normal file
15
strings-bytes/category_demo.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import sys
|
||||
import unicodedata
|
||||
|
||||
categories = set()
|
||||
|
||||
for i in range(sys.maxunicode):
|
||||
char = chr(i)
|
||||
name = unicodedata.name(char, None)
|
||||
if name is None:
|
||||
continue
|
||||
cat = unicodedata.category(char)
|
||||
if cat[0] not in categories:
|
||||
print('U+%04x' % i, char.center(6),
|
||||
cat, name, sep='\t')
|
||||
categories.add(cat[0])
|
||||
Reference in New Issue
Block a user