Set mysql character set to utf8 explicitly to support chinese characters (or other special characters).
This commit is contained in:
parent
e6f4cdb584
commit
6009bba339
|
@ -102,6 +102,7 @@ bool zmDbConnect() {
|
||||||
if ( mysql_query(&dbconn, "SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED") ) {
|
if ( mysql_query(&dbconn, "SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED") ) {
|
||||||
Error("Can't set isolation level: %s", mysql_error(&dbconn));
|
Error("Can't set isolation level: %s", mysql_error(&dbconn));
|
||||||
}
|
}
|
||||||
|
mysql_set_character_set(&dbconn, "utf8");
|
||||||
zmDbConnected = true;
|
zmDbConnected = true;
|
||||||
return zmDbConnected;
|
return zmDbConnected;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue