sync with O'Reilly Atlas
This commit is contained in:
@@ -51,7 +51,7 @@ def shave_marks_latin(txt):
|
||||
if unicodedata.combining(c) and latin_base: # <2>
|
||||
continue # ignore diacritic on Latin base char
|
||||
preserve.append(c) # <3>
|
||||
# if it isn't combining char, it's a new base char
|
||||
# if it isn't a combining char, it's a new base char
|
||||
if not unicodedata.combining(c): # <4>
|
||||
latin_base = c in string.ascii_letters
|
||||
shaved = ''.join(preserve)
|
||||
|
||||
@@ -18,8 +18,7 @@ for line in zwg_sample.strip().split('\n'):
|
||||
code, descr, version = (s.strip() for s in line.split('|'))
|
||||
chars = [chr(int(c, 16)) for c in code.split()]
|
||||
print(''.join(chars), version, descr, sep='\t', end='')
|
||||
while chars:
|
||||
char = chars.pop(0)
|
||||
for char in chars:
|
||||
if char in markers:
|
||||
print(' + ' + markers[char], end='')
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user