Explicitly set charset for PyMySQL-Connection
Since PyMySQL-Connection otherwise uses charset 'latin-1', explicitly set connection charset to 'utf8' http://docs.sqlalchemy.org/en/rel_1_0/dialects/mysql.html#charset-selection http://docs.sqlalchemy.org/en/rel_1_0/core/engines.html?highlight=url#sqlalchemy.engine.url.URL Related Task: [FS#156](https://fs.golderweb.de/index.php?do=details&task_id=156)
This commit is contained in:
@@ -51,7 +51,8 @@ url = URL( "mysql+pymysql",
|
|||||||
password=config.db_password,
|
password=config.db_password,
|
||||||
host=config.db_hostname,
|
host=config.db_hostname,
|
||||||
port=config.db_port,
|
port=config.db_port,
|
||||||
database=config.db_username + jogobot.config['db_suffix'] )
|
database=config.db_username + jogobot.config['db_suffix'],
|
||||||
|
query={'charset': 'utf8'} )
|
||||||
|
|
||||||
engine = create_engine(url, echo=True)
|
engine = create_engine(url, echo=True)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user