1.All of your mysql tables must use utf8 charset and be in utf8_general_ci collation
2.Your language files (English.php Bulgarian.php) must contain :
PHP Code:
define('CHARSET', 'utf-8');
3.your /includes/classes/db/mysql/query_factory.php about line 37 must be changed from
PHP Code:
function connect($zf_host, $zf_user, $zf_password, $zf_database, $zf_pconnect = 'false', $zp_real = false) {
//@TODO error class required to virtualise & centralise all error reporting/logging/debugging
$this->database = $zf_database;
if (!function_exists('mysql_connect')) die ('Call to undefined function: mysql_connect(). Please install the MySQL Connector for PHP');
if ($zf_pconnect != 'false') {
$this->link = @mysql_connect($zf_host, $zf_user, $zf_password, true);
} else {
// pconnect disabled ... leaving it as "connect" here instead of "pconnect"
$this->link = @mysql_connect($zf_host, $zf_user, $zf_password, true);
}
if ($this->link) {
if (@mysql_select_db($zf_database, $this->link)) {
$this->db_connected = true;
return true;
} else {
$this->set_error(mysql_errno(),mysql_error(), $zp_real);
return false;
}
} else {
$this->set_error(mysql_errno(),mysql_error(), $zp_real);
return false;
}
}
to
PHP Code:
function connect($zf_host, $zf_user, $zf_password, $zf_database, $zf_pconnect = 'false', $zp_real = false) {
//@TODO error class required to virtualise & centralise all error reporting/logging/debugging
$this->database = $zf_database;
if (!function_exists('mysql_connect')) die ('Call to undefined function: mysql_connect(). Please install the MySQL Connector for PHP');
if ($zf_pconnect != 'false') {
$this->link = @mysql_connect($zf_host, $zf_user, $zf_password, true);
} else {
// pconnect disabled ... leaving it as "connect" here instead of "pconnect"
$this->link = @mysql_connect($zf_host, $zf_user, $zf_password, true);
}
if ($this->link) {
if (@mysql_select_db($zf_database, $this->link)) {
if (version_compare(mysql_get_server_info(), '4.1.0', '>=')) {
mysql_query('SET NAMES "utf8"', $this->link);}
$this->db_connected = true;
return true;
} else {
$this->set_error(mysql_errno(),mysql_error(), $zp_real);
return false;
}
} else {
$this->set_error(mysql_errno(),mysql_error(), $zp_real);
return false;
}
}
4.You must ensure that your bulgarian.php defines are written in utf-8 or they will come up as monkeys :)
Bookmarks