Hello from Czech Republic,
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 ...
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??
Thank you budha