[Zope] Change the encoding of a single ZPT page

Luiz Fernando Bernardes Ribeiro luiz.fernando.ribeiro at gmail.com
Tue Aug 29 11:28:30 EDT 2006


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.

I tried to encode the individual dynamic strings (obtained from database) in
the XML with no success, since zpublisher is configured to iso8859-1 I think
the xml is reencoded before it is sent. The XML file is declared with utf-8
encoding.

All strings containing international characters are encoded to utf with
python:reg.Field.decode('iso8859-1') in the xml file.

Flash loads the xml but all international characters disappears.

I'm using Zope 2.9, MySQL 4.0 with ISO8859-1 encoding.

Thanks in advance,

-- 
Luiz Fernando B. Ribeiro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20060829/247651de/attachment.htm


More information about the Zope mailing list