updated contents from Atlas repo
This commit is contained in:
15
strings-bytes/numerics.py
Normal file
15
strings-bytes/numerics.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import sys
|
||||
from unicodedata import name
|
||||
|
||||
for i in range(sys.maxunicode):
|
||||
char = chr(i)
|
||||
try:
|
||||
char_name = name(char)
|
||||
except ValueError: # no such name
|
||||
continue
|
||||
flags = []
|
||||
flags.append('D' if char.isdigit() else '')
|
||||
flags.append('N' if char.isnumeric() else '')
|
||||
if any(flags):
|
||||
flags = '\t'.join(flags)
|
||||
print('U+%04x' % i, char, flags, char_name, sep='\t')
|
||||
Reference in New Issue
Block a user