MySQL on full UTF8
May 11th, 2009
On the Orion’s Belt Translation Project we had no problems with encoding, until a player from Croatia told us that Croatian’s characters weren’t being properly persisted. I tried a direct update:
update Lang set Text = 'č,ć,ž,đ,š'
And MySQL complained with an invalid characters error. To fix this I had to change the column encoding to UTF8 (was latin1). But the application still wasn’t behaving properly. The application was sending to MySQL the following query:
update Lang set Text = 'c,c,z,d,s'
I don’t know who was transforming this (maybe the MySQL connector). To fix this I had to edit the connection string, and add the utf8 charset:
Server=s;User ID=u;Password=p;Database=d;CharSet=utf8
After these steps, everything worked fine.
Related Posts
- Funny Javascript Error
- Google Ad Manager
- Go4Mobility - Switch on Awards @ APDC
- Generics limitation or flaw?
- ORM White Paper




May 12th, 2009 at 1:55 pm
Equals to the SET NAMES or SET CHARACTER SET?
http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html
May 15th, 2009 at 2:21 pm
This is one of the most annoying aspects of mysql. I love it to death, but utf-8 should be the default moving foward…
June 6th, 2009 at 2:50 pm
[...] en MySQL, en el blog de Pablo Santos. (en [...]