Improve documentation for unidecode (#16986)
* Improve documentation for unidecode Minor changes to gen.py * Fix typo in gen.py
This commit is contained in:
parent
635c0b6cb9
commit
00551f972e
2 changed files with 28 additions and 26 deletions
|
|
@ -11,7 +11,7 @@ try:
|
|||
except ImportError:
|
||||
pass
|
||||
|
||||
def main2():
|
||||
def main():
|
||||
f = open("unidecode.dat", "wb+")
|
||||
for x in range(128, 0xffff + 1):
|
||||
u = eval("u'\\u%04x'" % x)
|
||||
|
|
@ -19,12 +19,12 @@ def main2():
|
|||
val = unidecode(u)
|
||||
|
||||
# f.write("%x | " % x)
|
||||
if x==0x2028: # U+2028 = LINE SEPARATOR
|
||||
if x == 0x2028: # U+2028 = LINE SEPARATOR
|
||||
val = ""
|
||||
elif x==0x2029: # U+2028 = PARAGRAPH SEPARATOR
|
||||
elif x == 0x2029: # U+2029 = PARAGRAPH SEPARATOR
|
||||
val = ""
|
||||
f.write("%s\n" % val)
|
||||
|
||||
f.close()
|
||||
|
||||
main2()
|
||||
main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue