Spell module: fix check of UTF8 strings in pyaspell
This commit is contained in:
parent
8aaf3bd6dc
commit
9495e43cc0
@ -45,6 +45,8 @@ def cmd_spell(msg):
|
||||
def check_spell(word, lang='fr'):
|
||||
a = Aspell(("lang", lang))
|
||||
if a.check(word):
|
||||
return True
|
||||
ret = True
|
||||
else:
|
||||
return a.suggest(word)
|
||||
ret = a.suggest(word)
|
||||
a.close()
|
||||
return ret
|
||||
|
@ -113,7 +113,7 @@ class AspellLinux(object):
|
||||
return bool(
|
||||
self.__lib.aspell_speller_check(
|
||||
self.__speller,
|
||||
_to_bytes(word),
|
||||
word,
|
||||
len(word)
|
||||
))
|
||||
else:
|
||||
@ -132,7 +132,7 @@ class AspellLinux(object):
|
||||
return self._aspellwordlist(
|
||||
self.__lib.aspell_speller_suggest(
|
||||
self.__speller,
|
||||
_to_bytes(word),
|
||||
word,
|
||||
len(word)
|
||||
))
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user