I'm struggling to get Yii to display utf8 correctly, even if both apache servers and my database are configured to display it correctly.
In particular, I have a kanji / kana dataset that I retrieve from the mysql database. As a simple test on it, I created a browse page to retrieve data from it using mysqli and with the yii mvc architecture. When it is pulled out using mysqli, it displays correctly, but when using yii it does not. And this is from the same exact page, which also means it from the same controller. Did I miss something by forcing the model backend to use utf8 encoding?
Image: http://i.imgur.com/BLmrP.png
Here is the code that I use in the view file for the yii mvc file:
<?php $this->widget('zii.widgets.grid.CGridView', array(
'dataProvider'=>$dataProvider,
'enablePagination' => false,
)); ?>
And then mysqli is what you expect.
Any help would be greatly appreciated.
source
share