fix connection encoding issue. emoji work now
This commit is contained in:
parent
e94743b0a9
commit
41b592fcd1
|
@ -34,7 +34,11 @@ class Database():
|
||||||
Opens a connection to the app's database and executes the SQL
|
Opens a connection to the app's database and executes the SQL
|
||||||
statements passed to this function.
|
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)
|
cur.execute(*args, **kwargs)
|
||||||
return cur
|
return cur
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user