encode facts coming out of Facts to python string

This commit is contained in:
Brian S. Stephan 2010-12-20 22:22:37 -06:00
parent 107b754a0d
commit ae6eda2c6a
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ class Facts(Module):
fact = facts[random.randint(1,len(facts))-1]
# success
return self.reply(connection, replypath, fact['fact'].rstrip())
return self.reply(connection, replypath, fact['fact'].rstrip().encode('utf-8', 'ignore'))
except sqlite3.Error as e:
return self.reply(connection, replypath, "sqlite error: " + str(e))