Mercurial > kallithea
changeset 5619:6353b5e87091
ini: specify utf8 for sample MySQL connection strings
By default, the MySQL stack will store unicode as UTF-8 encoded data in string
fields, thus without using any unicode capabilities in the database.
As described in
http://docs.sqlalchemy.org/en/latest/dialects/mysql.html#mysql-unicode , set
charset=utf8 to actually put unicode in the database.
Existing databases that already store utf8 in the database should keep using
the old url.
This will only support 16 bit code points, but utf8mb4 will double the key size
and make them too big for MySQL.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Tue, 05 Jan 2016 16:30:11 +0100 |
parents | 82ed7ad0dc48 |
children | ddefc55eaf08 |
files | development.ini kallithea/bin/template.ini.mako kallithea/config/deployment.ini_tmpl kallithea/tests/test.ini |
diffstat | 4 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/development.ini Tue Jan 05 16:30:05 2016 +0100 +++ b/development.ini Tue Jan 05 16:30:11 2016 +0100 @@ -493,7 +493,7 @@ #sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea # MySQL -#sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea +#sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea?charset=utf8 # see sqlalchemy docs for others
--- a/kallithea/bin/template.ini.mako Tue Jan 05 16:30:05 2016 +0100 +++ b/kallithea/bin/template.ini.mako Tue Jan 05 16:30:11 2016 +0100 @@ -495,7 +495,7 @@ %elif database_engine == 'mysql': # MySQL -sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea +sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea?charset=utf8 %endif # see sqlalchemy docs for others
--- a/kallithea/config/deployment.ini_tmpl Tue Jan 05 16:30:05 2016 +0100 +++ b/kallithea/config/deployment.ini_tmpl Tue Jan 05 16:30:11 2016 +0100 @@ -485,7 +485,7 @@ #sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea # MySQL -#sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea +#sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea?charset=utf8 # see sqlalchemy docs for others
--- a/kallithea/tests/test.ini Tue Jan 05 16:30:05 2016 +0100 +++ b/kallithea/tests/test.ini Tue Jan 05 16:30:11 2016 +0100 @@ -495,7 +495,7 @@ #sqlalchemy.db1.url = postgresql://user:pass@localhost/kallithea # MySQL -#sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea +#sqlalchemy.db1.url = mysql://user:pass@localhost/kallithea?charset=utf8 # see sqlalchemy docs for others