Implement more accurate management of the current charset

This commit is contained in:
Kijin Sung 2016-01-11 11:12:02 +09:00
parent ecac6d1490
commit d9a9cfe21b
4 changed files with 25 additions and 9 deletions

View file

@ -45,7 +45,14 @@ class DBMysqli extends DBMysql
$this->setError($error, mysqli_connect_error());
return;
}
$charset = isset($connection["db_charset"]) ? $connection["db_charset"] : 'utf8';
if(isset($connection["db_charset"]))
{
$charset = $this->charset = $connection["db_charset"];
}
else
{
$charset = 'utf8';
}
mysqli_set_charset($result, $charset);
return $result;
}