From: philipp Date: Sat, 30 Oct 2010 17:03:24 +0000 (+0000) Subject: Adding use_unicode=0 to the MySQL database connection string restores the behavior... X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wradmin.git/commitdiff_plain/710de5342451a78dd4b955371908a91a630d0c37 Adding use_unicode=0 to the MySQL database connection string restores the behavior, that unicode strings are returned instead of strings. If use_unicode=1 (default), sqlalchemy requests unicode strings from the MySQLdb backend (and does not do the conversion itself), however, since the tables are defined as 'varchar(x) binary' only binary string are returned and not converted to unicode. git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/trunk/wradmin@617 7aebc617-e5e2-0310-91dc-80fb5f6d2477 --- diff --git a/wradmin/development.ini b/wradmin/development.ini index ccfe1a5..0239233 100644 --- a/wradmin/development.ini +++ b/wradmin/development.ini @@ -36,7 +36,8 @@ authkit.basic.authenticate.user.data = #beaker.session.data_dir = %(here)s/data/sessions # SQLAlchemy database URL -sqlalchemy.url = mysql://philipp@localhost:3306/winterrodeln_wiki?charset=utf8 +sqlalchemy.url = mysql://philipp@localhost:3306/winterrodeln_wiki?charset=utf8&use_unicode=0 +# If use_unicode=1, sqlalchemy requests unicode strings from the MySQLdb backend (and does not do the conversion itself), however, since the tables are defined as 'varchar(x) binary' only binary string are returned and not converted to unicode. # necessary for mySQL databases sqlalchemy.pool_recycle = 3600 # sqlalchemy.echo_pool = 1 diff --git a/wradmin/wradmin/config/deployment.ini_tmpl b/wradmin/wradmin/config/deployment.ini_tmpl index 095acad..d0fa0d4 100644 --- a/wradmin/wradmin/config/deployment.ini_tmpl +++ b/wradmin/wradmin/config/deployment.ini_tmpl @@ -36,7 +36,7 @@ authkit.basic.authenticate.user.data = #beaker.session.data_dir = %(here)s/data/sessions # SQLAlchemy database URL -sqlalchemy.url = mysql://user@localhost:3306/winterrodeln_wiki?charset=utf8 +sqlalchemy.url = mysql://user@localhost:3306/winterrodeln_wiki?charset=utf8&use_unicode=0 # necessary for mySQL databases sqlalchemy.pool_recycle = 3600