EC-CUBE2.11のインストール。(文字化け対策)
やっぱり2.11でも文字化けの問題が…。
去年、日本で働く外人さん(Webクリエイター)と話す機会があったので
「日本で仕事をする上で、一番障害になったこと」
を聞いてみたら、予想通り"文字コード"の問題だった。
とりあえず、文字化け回避のカスタマイズメモ。
/data/class/SC_Query.php の79行目付近を
$this->conn->setCharset(CHAR_CODE);
▽
$this->conn->setCharset('utf8');
に変更して…。
/data/module/MDB2/Driver/mysql.phpの539行目付近を
if (!empty($this->dsn['charset'])) {
$result = $this->setCharset($this->dsn['charset'], $connection);
if (PEAR::isError($result)) {
$this->disconnect(false);
return $result;
}
}
▽
$result = $this->setCharset('utf8', $connection);
if (PEAR::isError($result)) {
$this->disconnect(false);
return $result;
}
って感じに変更。
作業は、インストール前に行うこと。
去年、日本で働く外人さん(Webクリエイター)と話す機会があったので
「日本で仕事をする上で、一番障害になったこと」
を聞いてみたら、予想通り"文字コード"の問題だった。
とりあえず、文字化け回避のカスタマイズメモ。
/data/class/SC_Query.php の79行目付近を
$this->conn->setCharset(CHAR_CODE);
▽
$this->conn->setCharset('utf8');
に変更して…。
/data/module/MDB2/Driver/mysql.phpの539行目付近を
if (!empty($this->dsn['charset'])) {
$result = $this->setCharset($this->dsn['charset'], $connection);
if (PEAR::isError($result)) {
$this->disconnect(false);
return $result;
}
}
▽
$result = $this->setCharset('utf8', $connection);
if (PEAR::isError($result)) {
$this->disconnect(false);
return $result;
}
って感じに変更。
作業は、インストール前に行うこと。