fix connection encoding issue. emoji work now

This commit is contained in:
iou1name 2018-06-27 10:17:05 -04:00
parent e94743b0a9
commit 41b592fcd1

View File

@ -34,7 +34,11 @@ class Database():
Opens a connection to the app's database and executes the SQL
statements passed to this function.
"""
with MySQLdb.connect(user=self.user,passwd=self.key,db=self.db) as cur:
with MySQLdb.connect(
user=self.user,
passwd=self.key,
db=self.db,
charset='utf8mb4') as cur:
cur.execute(*args, **kwargs)
return cur