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

Sam Brauer sam at webslingerz.com
Mon Aug 18 09:50:19 EDT 2003


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" />


Maciej Żarski wrote:
> Hello,
> 
> I have a problem with setting the response character encoding for customized
> CMF templates. Here is my current workaround:
> 1) I go to the 'portal_skins/zpt_generic/folder_contents' template and
> customize it to the 'portal_skins/custom' folder
> 2) I change the name of this template to 'folder_contents_tpl'
> 3) I add the following DTML method to 'portal_skins/custom' with a name
> 'folder_contents':
> <dtml-call "RESPONSE.setHeader('Content-Type', 'text/html; charset=utf-8')">
> <dtml-var folder_contents_tpl>
> 
> I know that this is ugly, but can anyone give me an alternative solution? Is
> there a single place where I can specify
> the default response character encoding for CMF templates?
> 
> 
> Regards,
> 
> Maciej Zarski
> 
> 
> 
> 
> 
> _______________________________________________
> 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