I have possibly strangest thing I ever run into with Yii. I don’t know what happened, so I don’t know if this is or isn’t Yii related.
Suddenly my CGridView started to display incorrectly encoded UTF-8 national characters and for the reason beyond my understanding started to captialize first letter in each word in each header.
So the code for columns of CGridView is:
'selectableRows'=>1,
'columns'=>array
(
'ROWNUMID:text:L. p.',
array
(
'name'=>'test',
'type'=>'raw',
'value'=>'$data->NAZW." ".$data->IMIE',
'htmlOptions'=>array('style'=>'text-align: left'),
),
'PLEC',
array
(
'name'=>'ęóąśłżźćń ĘÓĄŚŁŻŹĆŃ',
'type'=>'raw',
'value'=>'CFR::generatePatientBornDiv($data->PESL, $data->UDAT)',
),
'ZLCCNT'
),
And the actual result you can see in screen capture:
1359
Notice, that ‘pacjent’ has first letter uppercased, and that there is garbage in place of test Polish letters.
The strangest part is for field "PLEC", which has name defined in Model class and this name contains "ł" Polish national letter and this letter is printed correctly, why in the very same time, in second column, the very same letter is printed incorrectly.
Both model and view files are correctly coded in UTF-8. As Netbeans uses this by default. In fact all my files are encoded in UTF-8 and nothing has ever changed in this matter for months.
I’m completely out of ideas what could happen and how to work this out?