The following usecase is not handled correctly by Zope:

When you call a PythonScript returning a Python unicode string then
the ZPublisher/HTTPResponse code will convert the unicode response string using HTTPResponse.default_encoding to a Python string. The default encoding is configurable through zope.conf (zpublisher_default_encoding key). This works fine unless you change the encoding to utf-8. In this case Zope sends out UTF8 content without specifying the encoding in the content-type header.

I propose the following changes:

- Zope adds content-type: text/plain|html when no content-type
is specified by the application. In this case we would add 'charset=<DEFAULT_ENCODING>

- if the application specfies a content-type header then we would add the
  charset only if it is undefined



Attachment: pgp3Rso2INRf3.pgp
Description: PGP signature

Zope-Dev maillist  -
**  No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to