mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 19:02:18 +00:00
fixes #8768
This commit is contained in:
@@ -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
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user