utf8 problem
Posted by: Robert Collazo
Date: February 16, 2006 08:06AM

I've been running the webapp Moodle for several months now with no problems. I need to migrate my Moodle installation to another server. I'm running Gentoo Linux on my production server (www) and also on the machine I'm migrating to (testbed). They are both running Apache 2.0.55-r1, MySQL 4.1.14 and PHP 5.1.1. The only difference between the two machines is that on the testbed machine, I compiled MySQL using the "UTF8" use flag. However, when I try to view content that is not in English on the testbed machine, it displays like this:

грабёж

rather than this:

грабёж

Any thoughts? I've tried to view it in both IE and Firefox. The encoding for the pages is set as Unicode (UTF-8).

The relevant portions of MySQL's my.conf file on the production machine:

[mysql]
character-sets-dir=utf8
default-character-set=utf8

[mysqladmin]
character-sets-dir=utf8
default-character-set=utf8

[mysqlcheck]
character-sets-dir=utf8
default-character-set=utf8

[mysqldump]
character-sets-dir=utf8
default-character-set=utf8

[mysqlimport]
character-sets-dir=utf8
default-character-set=utf8

[mysqlshow]
character-sets-dir=utf8
default-character-set=utf8

[myisamchk]
character-sets-dir=utf8

[myisampack]
character-sets-dir=utf8

# use [safe_mysqld] with mysql-3
[mysqld_safe]
err-log = /var/log/mysql/mysql.err

# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations.
[mysqld]
character-set-server = utf8
default-character-set = utf8

The my.cnf looks the same on the testbed machine.

I also have "AddDefaultCharset off" in my httpd.conf file on both machines. The only difference between the two machines is that I compiled MySQL with the "USE=utf8" flag on the testbed server. Using phpmyadmin 2.7.0, viewing the text in the table on the production machine, it displays as "грабёж". The collation on the column the data is in is utf8_general_ci.

Any thoughts on getting it to really be in utf8?

Options: ReplyQuote


Subject
Views
Written By
Posted
utf8 problem
2489
February 16, 2006 08:06AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.