Improve documentation for unidecode (#16986)

* Improve documentation for unidecode

Minor changes to gen.py

* Fix typo in gen.py
This commit is contained in:
konsumlamm 2021-02-09 22:47:07 +01:00 • committed by GitHub
commit 00551f972e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 26 deletions

View file

@ -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()