Before installation open the file data/database/default/mysql_default.sql
and replace each
TYPE=MyISAM;
with
TYPE=MyISAM CHARACTER SET=cp1251;
change cp1251 to encoding of your site
2. in the file includes/db_mysql.php
find
function Db($db_host, $db_user, $db_password = "", $db_name = "", $db_pconnect = 0) {
$connect_handle = ($db_pconnect) ? "mysql_pconnect" : "mysql_connect";
if (!$this->connection = $connect_handle($db_host, $db_user, $db_password)) {
$this->error("Could not connect to the database server ($db_host, $db_user).", 1);
}
if ($db_name != "") {
if (!@mysql_select_db($db_name)) {
@mysql_close($this->connection);
$this->error("Could not select database ($db_name).", 1);
}
}
return $this->connection;
}
replace with
function Db($db_host, $db_user, $db_password = "", $db_name = "", $db_pconnect = 0) {
$connect_handle = ($db_pconnect) ? "mysql_pconnect" : "mysql_connect";
if (!$this->connection = $connect_handle($db_host, $db_user, $db_password)) {
$this->error("Could not connect to the database server ($db_host, $db_user).", 1);
}
mysql_query ("set character_set_client='cp1251'");
mysql_query ("set character_set_results='cp1251'");
mysql_query ("set collation_connection='cp1251_general_ci'");
if ($db_name != "") {
if (!@mysql_select_db($db_name)) {
@mysql_close($this->connection);
$this->error("Could not select database ($db_name).", 1);
}
}
return $this->connection;
}
change cp1251 to encoding of your site
3. if you use cp1251 - in the file includes/search_utils.php
find
$val = convert_special($val);
replace with
// $val = convert_special($val);
3.a if you use utf8 - in the file includes/search_utils.php
find
function convert_special($text) {
return strtr(
$text,
array(
"Ä" => "AE",
"Ö" => "OE",
"Ü" => "UE",
"ä" => "ae",
"ö" => "oe",
"ü" => "ue",
"ß" => "ss"
)
);
}
replace with
function convert_special($text) {
return strtr(
$text,
array(
"×" => "÷",
"Á" => "á",
"¨" => "Å",
"¸" => "å"
)
);
}
and save the file in utf-8 format