<![CDATA[ MODx utf8 and czech - My Forums]]> https://forums.modx.com/thread/?thread=4876 <![CDATA[Re: MODx utf8 and czech]]> https://forums.modx.com/thread/4876/modx-utf8-and-czech#dis-post-30898 MYSQL_QUERY(’SET NAMES utf8’,$modxDBConn);
MYSQL_QUERY(’SET CHARACTER SET utf8’,$modxDBConn);
MYSQL_QUERY("SET SESSION collation_connection = ’utf8_general_ci’",$modxDBConn);]]>
Nuker Apr 19, 2006, 04:04 PM https://forums.modx.com/thread/4876/modx-utf8-and-czech#dis-post-30898
<![CDATA[Re: MODx utf8 and czech]]> https://forums.modx.com/thread/4876/modx-utf8-and-czech#dis-post-30897 If i Edit page title in QEdit then it’s correct saved and displayed, if i use manager, then get huh?? again.
Before my fix is worked properly, while i not restarted mysql.
let me know if you solve this problem]]>
Nuker Apr 19, 2006, 01:34 PM https://forums.modx.com/thread/4876/modx-utf8-and-czech#dis-post-30897
<![CDATA[Re: MODx utf8 and czech]]> https://forums.modx.com/thread/4876/modx-utf8-and-czech#dis-post-30896 Use utf-8.

first edit the ./manager/index.php
// 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');
        MYSQL_QUERY('SET CHARACTER SET utf8');
}


  • do it also in dbapi.mysql.class.inc.php - function connect();
  • in site settings select codepage utf-8
  • in your template(s), in header must be this line <meta http-equiv="Content-Type" content="text/html; charset=[(etomite_charset)]" />
  • and mysql database tables must be in utf8 (may’be not important)

let’me know after you comlete. nuker [at] perm [dot] ru

PS: are you speak russian?]]>
Nuker Apr 19, 2006, 04:28 AM https://forums.modx.com/thread/4876/modx-utf8-and-czech#dis-post-30896
<![CDATA[MODx utf8 and czech]]> https://forums.modx.com/thread/4876/modx-utf8-and-czech#dis-post-30895 last week I get through installation of MODx CMS, but now I have trouble "how correctly setup language of CMS".

What I mean:
- my MySQL database modx has character set = cp1250 (I can’t change it because it’s hosting DB)
- in administration of MODx I set character encoding = utf-8 and site name = "ěščřžýáíé" (to test czech letters)
- in my template I wrote "<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />"

And result is
- in administration is shown bad sitename = "ě????????????????"
- on front page is shown bad sitename = "ě????????????????"

Same problem I solved in past with other CMS (PostNuke, Xaraya, ... etc) by calling SQL statements after CMS connected to DB:

SET NAMES ’utf8’;
SET character_set_results = utf8;
SET collation_connection = @@collation_database;

So I tried append lines to dbapi.mysql.class.inc.php - function connect()

@mysql_query("SET NAMES ’utf8’;", $this->conn);
@mysql_query("SET character_set_results = utf8;", $this->conn);
@mysql_query("SET collation_connection = @@collation_database;", $this->conn);

or

$this->db->query("SET NAMES ’utf8’;");
$this->db->query("SET character_set_results = utf8;");
$this->db->query("SET collation_connection = @@collation_database;");

but it doesn’t work for me ... sad

If I tried manually change file \modx\assets\cache\siteCache.idx.php
$c[’site_name’] = "ěščřžýáíé";
then it works, but if I change in Administration >> System configuration >>
Site name = "ěščřžýáíé";
and save it, then in siteCache.idx.php is wrong line again
$c[’site_name’] = "ě????????????";

Please could you help me how to solve it?? huh

Thank you budha]]>
budha Mar 23, 2006, 12:56 AM https://forums.modx.com/thread/4876/modx-utf8-and-czech#dis-post-30895