Thank you Matthew.

This issue was my misunderstanding of what the view.encoding was for.
I thougt it was the target encoding (ie related to page Content-Type).
But it is used only by escape() method as the source encoding of the text.
Therefore, when I was setting the view.encoding to "UTF-8", I was wrong
because my PHP sources are ISO-8859-1 encoded.


Matthew Weier O'Phinney-3 wrote:
> 
> -- Guillaume Oriol <[EMAIL PROTECTED]> wrote
> (on Wednesday, 24 September 2008, 04:05 AM -0700):
>> I wonder why my view sets an HTTP header of
>> "Content-Type: text/html; charset=iso-8859-1"
>> 
>> despite the configuration I do in the bootsrap.php with:
>> $view = new Zend_View($config->view->toArray());
>> 
>> referencing my config.ini with :
>> view.encoding="UTF-8"
>> view.escape=htmlentities
>> view.strictVars=1
>> 
>> which produces, as expected, in my rendered page:
>> <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
>> 
>> Where is my error?
> 
> Zend_View's encoding is simply to ensure that the view scripts render
> with the appropriate encoding. Setting it does not create the
> appropriate <meta> tag nor does setting it set the Content-Type header.
> 
> You can set the default content-type header in your apache and/or PHP
> configuration, or you can do it in your bootstrap code.
> 
> -- 
> Matthew Weier O'Phinney
> Software Architect       | [EMAIL PROTECTED]
> Zend Framework           | http://framework.zend.com/
> 
> 


-----
Guillaume ORIOL
Sofware architect
Technema
-- 
View this message in context: 
http://www.nabble.com/encoding-in-HTTP-headers-tp19646506p19666366.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to