fixes #8768
This commit is contained in:
parent
3e6b58323b
commit
a14ffd6119
3 changed files with 436 additions and 436 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue