Spell module: fix encoding problem
This commit is contained in:
parent
ad7c8e6fce
commit
d88146780f
2 changed files with 15 additions and 21 deletions
|
|
@ -80,10 +80,10 @@ def cmd_score(msg):
|
|||
return res
|
||||
|
||||
def check_spell(word, lang='fr'):
|
||||
a = Aspell(("lang", lang))
|
||||
if a.check(word):
|
||||
a = Aspell([("lang", lang), ("lang", "fr")])
|
||||
if a.check(word.encode("iso-8859-15")):
|
||||
ret = True
|
||||
else:
|
||||
ret = a.suggest(word)
|
||||
ret = a.suggest(word.encode("iso-8859-15"))
|
||||
a.close()
|
||||
return ret
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue