1
0
Fork 0
mirror of https://github.com/Lynnesbian/FediBooks/ synced 2024-11-25 08:38:59 +00:00

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'], host = cfg['db_host'],
user=cfg['db_user'], user=cfg['db_user'],
passwd=cfg['db_pass'], passwd=cfg['db_pass'],
db=cfg['db_name'] db=cfg['db_name'],
use_unicode=True,
charset="utf8mb4"
) )
cursor = db.cursor() cursor = db.cursor()

View file

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