enable db unicode support

This commit is contained in:
Lynne Megido 2019-09-10 22:21:22 +10:00
parent 57278a65ba
commit 38463fefb2
2 changed files with 6 additions and 2 deletions

View File

@ -86,7 +86,9 @@ db = MySQLdb.connect(
host = cfg['db_host'],
user=cfg['db_user'],
passwd=cfg['db_pass'],
db=cfg['db_name']
db=cfg['db_name'],
use_unicode=True,
charset="utf8mb4"
)
cursor = db.cursor()

View File

@ -11,7 +11,9 @@ db = MySQLdb.connect(
host = cfg['db_host'],
user=cfg['db_user'],
passwd=cfg['db_pass'],
db=cfg['db_name']
db=cfg['db_name'],
use_unicode=True,
charset="utf8mb4"
)
print("Cleaning up database")