* My MySQL database is UTF-8 encoded,
* all my source pages are UTF-8 encoded,
* I have the following meta-tag :
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
(I can confirm with FF Web developer Toolbar that the rendered page is
encoded in utf-8)
* I added $this->view->setEncoding('UTF-8'); in the predispatch method
inherited by all my controllers,
But when I want to display the list of countries I have in my MySQL DB,
I still have those weird characters. E.g. for country "Côte d'Ivoire"
I cannot see the letter ô but a weird character instead.
Now I am hopeless, clueless.
Jack Sleight wrote:
>
> Nope, that's all you need to tell the browser which encoding the page is
> in. Of course you can set the header a well/instead, it will work either
> way. The only other thing you might need to do is set the view objects
> encoding, so that the escape() method works correctly:
>
> $view->setEncoding('UTF-8');
>
> debussy007 wrote:
>> I had already this :
>> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
>>
>> I need nothing else ?
>> I tought I had to set the HTTP header to UTF-8 also by this php code.
>>
>>
>>
>> Jack Sleight wrote:
>>
>>
>>
>
> --
> Jack
>
>
--
View this message in context:
http://www.nabble.com/Best-place-to-specify-encoding-tf4621717s16154.html#a13199704
Sent from the Zend Framework mailing list archive at Nabble.com.