[Zope] Charset HTTP header switched to UTF-8. Bug or feature ?

Chris Withers chrisw at nipltd.com
Thu Aug 28 12:08:20 EDT 2003


Gilles Lenfant wrote:
> The "sometemplate" is published with this HTTP header :
> 
> Content-Type: text/html;charset=UTF-8
> 
> When nowhere in my scripts/templates, I stated to use that charset.
> You can imagine the ugly things that are displayed :-/

Toby Dickenson would be the man to ask, IIRC.
Have you set UTF-8 as a default anywhere on your system?

> I found a workaround: forcing the HTTP header of the response...
> 
> <sample>
> REQUEST.RESPONSE.setHeader('Content-Type', 'text/html; charset=iso-8859-1')
> 
> return context.sometemplate(param1=value1, ...)
> </sample>

What about putting a meta declaration in the <head>? At least you don't have the 
clunky python code then...

cheers,

Chris




More information about the Zope mailing list