UTF-8 issues (and how to fix them)
Posted: Thu 5. Jan 2006, 17:02
I have the same problem as it is described in this thread http://www.phpwcms.de/forum/viewtopic.php?t=8979
Some characters didn't show up OK in utf-8 encoded page (not in the backend, not in the front end), specifically č (ccaron).
I found out that if you are using utf-8 encoding it's necessary to tell that to MySQL - http://dev.mysql.com/doc/refman/4.1/en/ ... ction.html
So I added these lines to default.inc.php just after connection code (line 90 in v1.2.6 14.12.05) and it solved my problems.
I'm not sure if this is perfect solution, it works for me.
If somebody else have the same problem - you should try this.
And hopefully this will be fixed in next version
boris
Some characters didn't show up OK in utf-8 encoded page (not in the backend, not in the front end), specifically č (ccaron).
I found out that if you are using utf-8 encoding it's necessary to tell that to MySQL - http://dev.mysql.com/doc/refman/4.1/en/ ... ction.html
So I added these lines to default.inc.php just after connection code (line 90 in v1.2.6 14.12.05) and it solved my problems.
Code: Select all
if ($phpwcms["charset"] == "utf-8") {
mysql_query("SET NAMES 'utf8'");
}
If somebody else have the same problem - you should try this.
And hopefully this will be fixed in next version
boris