|
@ -21,8 +21,11 @@ def to_utf8(string): |
|
|
elif type(string) is str: |
|
|
elif type(string) is str: |
|
|
return string.decode('iso-8859-1').encode('utf-8') |
|
|
return string.decode('iso-8859-1').encode('utf-8') |
|
|
else: |
|
|
else: |
|
|
LOGGER.warning("Ignoring a word I can not decode...") |
|
|
try: |
|
|
return None |
|
|
return string.encode('utf-8') |
|
|
|
|
|
except: |
|
|
|
|
|
LOGGER.warning("Ignoring a word I can not decode...") |
|
|
|
|
|
return "" |
|
|
|
|
|
|
|
|
def compile_authwords(authwords): |
|
|
def compile_authwords(authwords): |
|
|
"""Convert strings of authwords to compiled regular expressions. |
|
|
"""Convert strings of authwords to compiled regular expressions. |
|
|