[Zope] Change the encoding of a single ZPT page

Andreas Jung lists at zopyx.com
Tue Aug 29 11:34:13 EDT 2006



--On 29. August 2006 12:28:30 -0300 Luiz Fernando Bernardes Ribeiro 
<luiz.fernando.ribeiro at gmail.com> wrote:

> Hello all,
>
> Is it possible to change the encoding of a page without having to change
> the
> default-zpublisher-encoding option in zope.conf?
>
> My default encoding is iso8859-1 but we have to generate some XML files
> to a
> flash app, but flash only accept utf-8.

If you edit your ZPTs through the ZMI you might set the manage_page_charset 
to utf-8. If the content-type of your ZPT is set to text/xml then the 
ZPublisher should auto-detect the encoding from the XML preamble. The 
setting in zope.conf is just a fallback (at least in Zope 2.9+).

-aj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20060829/30bd38da/attachment.bin


More information about the Zope mailing list