my mysql db used 2 web sites: first built in yii, second usual php made site. have usual registration in second site, after submission form results in db non-readable (in russian), after output of user profile results normal russian. yii web site displays results in db (non readable). tried encode via utf8_encode
, result unreadable. please tell me how avoid coding issue in yii?
in db declare encoding (utf8 or 1252):
'db'=>array( 'connectionstring' => 'mysql:host=127.0.0.1;dbname=smartworkspace', 'emulateprepare' => true, 'username' => 'root', 'password' => '010101', 'charset' => 'utf8', 'tableprefix' => 'sw_' ),
and put header let browser know encoding using show page:
header('content-type: text/html; charset=utf-8');
i have in config file affects rest.
Comments
Post a Comment