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