A Bug Of Encoding

I’m using the latest version of Yii framework, and the widget is from the bootstrap extension.

code segment

<?php $this->widget(‘bootstrap.widgets.TbGridView’,array(

'id'=&gt;'item-grid',


'dataProvider'=&gt;&#036;postModel-&gt;search(),


'columns'=&gt;array(


	'title',


	array(


		'name'=&gt;'content',


		'value'=&gt;'strip_tags(&#036;data-&gt;content)',


	),


	'author_id',


	array(


		'name'=&gt;'作者',


		'value'=&gt;'&#036;data-&gt;author-&gt;nickname',


	),


	array(


		'name'=&gt;'类别',


		'value'=&gt;array(&#036;postModel, 'getCategories'),


	),

there are Chinese characters inside, and the titles are showing like this

Title Content Author Id Ľ�者 DZ�别

This is because ‘name’ is “the attribute name of the data model” according to the docs. To set the title you need to set ‘header’ instead of ‘name’.