[cakephp1.2.x.x][php]CakePHPで作成したアプリケーションの文字コード
CakePHPで作成したアプリケーションを、Shift-JISで表示させたいときには。。。
DB:mysqlをUTF8で作成。
.htaccess:以下のように設定しました。
php_flag output_buffering On
php_value output_handler mb_output_handler
php_value default_charset Shift_JIS
php_value mbstring.language japanese
php_flag mbstring.encoding_translation On
php_value mbstring.http_input auto
php_value mbstring.http_output SJIS
php_value mbstring.internal_encoding UTF-8
php_value mbstring.substitute_character none
Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.

当方、MSSQL2000+cakephp1.1.xで動かしているのですが、DBにSJISで格納する方法が分からず苦戦しております。上記のパラメータをいろいろと調整しましたが文字化けしたデータしか格納されない状態です。よい知恵をいただけないでしょうか。よろしくお願い致します。