From 3c3a03a5aea4a8c2c2f9835ca0a34a426d1153cf Mon Sep 17 00:00:00 2001 From: Marcus Lindvall Date: Wed, 10 Oct 2018 12:03:46 +0200 Subject: [PATCH] Use utf8mb4 charset for the DB connection to MySQL --- pyjeeves/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyjeeves/db.py b/pyjeeves/db.py index 840d3c5..f95618d 100644 --- a/pyjeeves/db.py +++ b/pyjeeves/db.py @@ -10,7 +10,7 @@ class MySQLSession(Session): """docstring for MySQLSession""" def __init__(self, settings): self.engine = create_engine( - 'mysql+pymysql://{user}:{passwd}@{host}:{port}/{db}'.format(**settings)) + 'mysql+pymysql://{user}:{passwd}@{host}:{port}/{db}?charset=utf8mb4'.format(**settings)) super(MySQLSession, self).__init__(bind=self.engine) def create_db(self):