MODx Revolutionで遊んでみようとして、コンテツに日本語を入力したら
文字化けをしたので、その時のことをめもφ(`д´)メモメモ...。
結論からするとちゃんと環境を設定しようー!でした。
Apache,MySQL,PHPのcharsetをUTF8にして、そのご、MODx Revolution
をsetupしましょー。OSは、UbuntuServerです。
Apacheの設定。
/etc/apache2/conf.d/charset
# Read the documentation before enabling AddDefaultCharset.
# In general, it is only a good idea if you know that all your files
# have this encoding. It will override any encoding given in the files
# in meta http-equiv or xml encoding tags.
AddDefaultCharset UTF-8
MySQLの設定。
/etc/mysql/conf.d/charset.cnf
[client]
default-character-set=utf8
[mysqld]
default-character-set = utf8
skip-character-set-client-handshake
character-set-server = utf8
collation-server = utf8_general_ci
init-connect = SET NAMES utf8
/etc/php5/apache2/php.ini
default_charset = "UTF-8"
を追加。
その後、セットアップ。
文字化けをしたので、その時のことをめもφ(`д´)メモメモ...。
結論からするとちゃんと環境を設定しようー!でした。
Apache,MySQL,PHPのcharsetをUTF8にして、そのご、MODx Revolution
をsetupしましょー。OSは、UbuntuServerです。
Apacheの設定。
/etc/apache2/conf.d/charset
# Read the documentation before enabling AddDefaultCharset.
# In general, it is only a good idea if you know that all your files
# have this encoding. It will override any encoding given in the files
# in meta http-equiv or xml encoding tags.
AddDefaultCharset UTF-8
MySQLの設定。
/etc/mysql/conf.d/charset.cnf
[client]
default-character-set=utf8
[mysqld]
default-character-set = utf8
skip-character-set-client-handshake
character-set-server = utf8
collation-server = utf8_general_ci
init-connect = SET NAMES utf8
/etc/php5/apache2/php.ini
default_charset = "UTF-8"
を追加。
その後、セットアップ。