mirror of
https://github.com/Lynnesbian/FediBooks/
synced 2024-12-27 06:48: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:
parent
cc4f64e758
commit
7681768ba4
1 changed files with 9 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue