[Zope-CMF] Hot to globally set character encoding?

Sam Brauer sam at webslingerz.com
Mon Aug 18 10:29:16 EDT 2003


I thought that might be the case.

Well, maybe somewhere near the top of main_template you could do this:

<tal:dummy replace="python:request.response.setHeader('Content-Type', 
'text/html;charset=utf-8')" />


(Based on example at http://www.zopelabs.com/cookbook/1014914220).

Maciej Żarski wrote:
> I have already tried this, but it doesn't work as expected. It seems that
> the response character encoding
> is already set before a template starts to render.
> 
> Maciej Zarski
> 
> 
> ----- Original Message -----
> From: "Sam Brauer" <sam at webslingerz.com>
> To: "Maciej Żarski" <maciej at bmpg.pl>
> Cc: <zope-cmf at zope.org>
> Sent: Monday, August 18, 2003 2:50 PM
> Subject: Re: [Zope-CMF] Hot to globally set character encoding?
> 
> 
> 
>>I haven't done this myself, but I would try setting it as a meta tag in
>>main_template (the template that produces the main html structure of all
>>of the CMF pages).
>>
>>Customize the template zpt_generic/main_template
>>and add the following tag to the html head.
>>
>><meta http-equiv="Content-Type"
>>       content="text/html;charset=utf-8" />
>>
>>
> 
> 
> 
> 
> 
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF at zope.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
> 
> See http://collector.zope.org/CMF for bug reports and feature requests


-- 
Sam Brauer
Systems Programmer
sam at webslingerZ.com




More information about the Zope-CMF mailing list