From 0e3dc0cd388387ea00c0e12bed9ef5387987d364 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 8 May 2013 00:00:20 +0000 Subject: [PATCH] Add some Unicode support to the server updater. --- database/schema.sql | 2 +- server/awfy.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/database/schema.sql b/database/schema.sql index 392deb2..4ed925d 100644 --- a/database/schema.sql +++ b/database/schema.sql @@ -118,7 +118,7 @@ CREATE TABLE IF NOT EXISTS `awfy_score` ( CREATE TABLE IF NOT EXISTS `awfy_suite` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `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, `sort_order` int(11) DEFAULT NULL, PRIMARY KEY (`id`), diff --git a/server/awfy.py b/server/awfy.py index d25f8c6..26550e8 100644 --- a/server/awfy.py +++ b/server/awfy.py @@ -23,9 +23,9 @@ def Startup(): name = config.get('mysql', 'name') 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: - db = mdb.connect(host, user, pw, name) + db = mdb.connect(host, user, pw, name, use_unicode=True) c = db.cursor() c.execute("SELECT `value` FROM awfy_config WHERE `key` = 'version'")