Add some Unicode support to the server updater.
This commit is contained in:
Родитель
c343c4864b
Коммит
0e3dc0cd38
|
@ -118,7 +118,7 @@ CREATE TABLE IF NOT EXISTS `awfy_score` (
|
||||||
CREATE TABLE IF NOT EXISTS `awfy_suite` (
|
CREATE TABLE IF NOT EXISTS `awfy_suite` (
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`name` varchar(45) DEFAULT NULL,
|
`name` varchar(45) DEFAULT NULL,
|
||||||
`description` varchar(45) DEFAULT NULL,
|
`description` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
|
||||||
`better_direction` int(11) DEFAULT NULL,
|
`better_direction` int(11) DEFAULT NULL,
|
||||||
`sort_order` int(11) DEFAULT NULL,
|
`sort_order` int(11) DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
|
|
|
@ -23,9 +23,9 @@ def Startup():
|
||||||
name = config.get('mysql', 'name')
|
name = config.get('mysql', 'name')
|
||||||
|
|
||||||
if host[0] == '/':
|
if host[0] == '/':
|
||||||
db = mdb.connect(unix_socket=host, user=user, passwd=pw, db=name)
|
db = mdb.connect(unix_socket=host, user=user, passwd=pw, db=name, use_unicode=True)
|
||||||
else:
|
else:
|
||||||
db = mdb.connect(host, user, pw, name)
|
db = mdb.connect(host, user, pw, name, use_unicode=True)
|
||||||
|
|
||||||
c = db.cursor()
|
c = db.cursor()
|
||||||
c.execute("SELECT `value` FROM awfy_config WHERE `key` = 'version'")
|
c.execute("SELECT `value` FROM awfy_config WHERE `key` = 'version'")
|
||||||
|
|
Загрузка…
Ссылка в новой задаче