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

Objections?

Andreas

Attachment: pgp3Rso2INRf3.pgp
Description: PGP signature

_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to