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

specify unicode and charset on db connection. idk why i need to do this since my server is configured to use these as the default values but whoooo knows

This commit is contained in:
Lynne Megido 2020-05-27 20:09:21 +10:00
parent cc4f64e758
commit 7681768ba4
Signed by: lynnesbian
GPG key ID: F0A184B5213D9F90

View file

@ -46,7 +46,9 @@ def generate_output(handle):
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("Generating post for {}".format(handle))
dc = db.cursor(MySQLdb.cursors.DictCursor)
@ -153,7 +155,9 @@ def make_post(args):
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"
)
c = db.cursor()
@ -190,7 +194,9 @@ def get_key():
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"
)
dc = db.cursor(MySQLdb.cursors.DictCursor)