This commit is contained in:
Araq
2018-08-30 15:33:34 +02:00
parent 3e6b58323b
commit a14ffd6119
3 changed files with 436 additions and 436 deletions

View File

@@ -5,22 +5,22 @@
# (c) 2010 Andreas Rumpf
from unidecode import unidecode
import warnings
def main2():
warnings.simplefilter("ignore")
def main2():
data = []
for x in xrange(128, 0xffff + 1):
u = eval("u'\u%04x'" % x)
for x in range(128, 0xffff + 1):
u = eval("u'\\u%04x'" % x)
val = unidecode(u)
data.append(val)
f = open("unidecode.dat", "wb+")
f = open("unidecode.dat", "w+")
for d in data:
f.write("%s\n" % d)
f.close()
main2()

File diff suppressed because it is too large Load Diff

View File

@@ -69,5 +69,5 @@ proc unidecode*(s: string): string =
when isMainModule:
loadUnidecodeTable("lib/pure/unidecode/unidecode.dat")
assert unidecode("Äußerst") == "Ausserst"
doAassert unidecode("Äußerst") == "Ausserst"
doAssert unidecode("北京") == "Bei Jing"