mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-01-20 23:30:17 +01:00
make sure MySQL use utf-8 #63
This commit is contained in:
parent
876d3dbec6
commit
6b7cf98034
|
|
@ -19,6 +19,7 @@ import mysql.connector
|
|||
from includes import globals # Global variables
|
||||
|
||||
from includes.helper import configHandler
|
||||
from includes.helper import uft8Converter # UTF-8 converter
|
||||
|
||||
##
|
||||
#
|
||||
|
|
@ -71,7 +72,7 @@ def run(typ,freq,data):
|
|||
# Connect to MySQL
|
||||
#
|
||||
logging.debug("connect to MySQL")
|
||||
connection = mysql.connector.connect(host = globals.config.get("MySQL","dbserver"), user = globals.config.get("MySQL","dbuser"), passwd = globals.config.get("MySQL","dbpassword"), db = globals.config.get("MySQL","database"))
|
||||
connection = mysql.connector.connect(host = globals.config.get("MySQL","dbserver"), user = globals.config.get("MySQL","dbuser"), passwd = globals.config.get("MySQL","dbpassword"), db = globals.config.get("MySQL","database"), charset='utf8')
|
||||
cursor = connection.cursor()
|
||||
except:
|
||||
logging.error("cannot connect to MySQL")
|
||||
|
|
|
|||
Loading…
Reference in a new issue