Hi,
I recently updated one of sites to use utf8 i config.inc.php. In configuration panel I have set Polish utf8 and database use utf_general_ci like all tables.
When I add new document, everything looks right, but when I try to add new chunk/template containing polish characters I get ’?’ instead of each of them. No matter I use YinyMCE or not
Be gratefull for help. Now I need to modify every broken piece of text in phpmyadmin
Regards,
Mike
//Why use windows since there is a door?//
I used tip by Nuker
http://modxcms.com/forums/index.php/topic,3584.0.html.
It simply needs updating
From:
// connect to the database
if(@!$modxDBConn = mysql_connect($database_server, $database_user, $database_password)) {
die("<h2>Failed to create the database connection!</h2>. Please run the MODx <a href='../install'>install utility</a>");
} else {
mysql_select_db($dbase);
@mysql_query("SET CHARACTER SET {$database_connection_charset}");
}
To:
// connect to the database
if(@!$modxDBConn = mysql_connect($database_server, $database_user, $database_password)) {
die("<h2>Failed to create the database connection!</h2>. Please run the MODx <a href='../install'>install utility</a>");
} else {
mysql_select_db($dbase);
MYSQL_QUERY('SET NAMES utf8',$modxDBConn);
MYSQL_QUERY('SET CHARACTER SET utf8',$modxDBConn);
MYSQL_QUERY("SET SESSION collation_connection = 'utf8_general_ci'",$modxDBConn);
}
//Why use windows since there is a door?//