Skip to content

Commit

Permalink
[installer] fix MOJIBAKE on ja_utf8
Browse files Browse the repository at this point in the history
  • Loading branch information
nao-pon committed Feb 15, 2017
1 parent 4f7ca97 commit 8b2993b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Expand Up @@ -7,10 +7,10 @@
* @license https://github.com/xoopscube/legacy/blob/master/docs/GPL_V2.txt GNU GENERAL PUBLIC LICENSE Version 2
*
*/
$set_charset = (XOOPS_DB_TYPE === 'mysqli')? 'mysqli_set_charset' : 'mysql_set_charset';
if (function_exists($set_charset)) {
$set_charset($this->db->conn, 'utf8');
} else {
$this->db->queryF("/*!40101 SET NAMES utf8 */");
$this->db->queryF("/*!40101 SET SESSION character_set_database=utf8 */");
$this->db->queryF("/*!40101 SET SESSION character_set_server=utf8 */");
// $this->db->queryF("/*!40101 SET SESSION collation_connection=ujis_japanese_ci */");
// $this->db->queryF("/*!40101 SET SESSION collation_database=ujis_japanese_ci */");
// $this->db->queryF("/*!40101 SET SESSION collation_server=ujis_japanese_ci */");
;
$this->db->queryF("/*!40101 SET SESSION collation_connection=utf8_general_ci */");
}
2 changes: 1 addition & 1 deletion html/install/class/dbmanager.php
Expand Up @@ -55,7 +55,7 @@ public function connectDB($selectdb = true)
if ($ret != false) {
$fname = dirname(dirname(__FILE__)).'/language/'.$GLOBALS['language'].'/charset_mysql.php';
if (file_exists($fname)) {
require_once($fname);
require($fname);
}
}
return $ret;
Expand Down

0 comments on commit 8b2993b

Please sign in to comment.