Sha256: 6c754f971c87b9aff73d2826371814750e2f43f5debc2b630704f6a2fefdca9b
Contents?: true
Size: 392 Bytes
Versions: 38
Compression:
Stored size: 392 Bytes
Contents
import re regex = re.compile('\|-\n\| (\w+)\n\|.+\n\| U\+\w+ \((\d+)\)\n\| (.+)\n') with open('wikipedia_table.txt') as wiki_table: table_text = wiki_table.read() for ent_name, dec_code, std in regex.findall(table_text): uni = list(unichr(int(dec_code)).encode('utf-8')) print '"%s", %d,' % (ent_name, len(uni)), print "{", ", ".join("0x%02X" % ord(c) for c in uni), "}"
Version data entries
38 entries across 38 versions & 2 rubygems