12 Mar
2015
12 Mar
'15
9:55 a.m.
On 11 Mar 2015, at 21:31, Felix Zandanel <felix@zandanel.me> wrote:
Although my MySQL installation is set up to use UTF-8 as the default charset on every level (config, database, table and field), and the character_set_* runtime variables all yield the value "utf8", it still seems that the mysql client library must be instructed to actually use UTF-8 explicitly. Adding the following statement to driver_mysql_connect() fixes the issue for me:
mysql_options(db->mysql, MYSQL_SET_CHARSET_NAME, "utf8");
I think you can also add to /etc/my.cnf :
[client] default-character-set = utf8