Changeset - 6353b5e87091
[Not reviewed]
default
0 4 0
Mads Kiilerich - 10 years ago 2016-01-05 16:30:11
madski@unity3d.com
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.
4 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
development.ini
Show inline comments
 
@@ -493,7 +493,7 @@ sqlalchemy.db1.url = sqlite:///%(here)s/
 
#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
 

	
kallithea/bin/template.ini.mako
Show inline comments
 
@@ -495,7 +495,7 @@ sqlalchemy.db1.url = postgresql://user:p
 

	
 
%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
kallithea/config/deployment.ini_tmpl
Show inline comments
 
@@ -485,7 +485,7 @@ sqlalchemy.db1.url = sqlite:///%(here)s/
 
#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
 

	
kallithea/tests/test.ini
Show inline comments
 
@@ -495,7 +495,7 @@ sqlalchemy.db1.url = sqlite:///%(here)s/
 
#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
 

	
0 comments (0 inline, 0 general)