----- Original Message ----- From: "Maik Jablonski" <maik.jablonski@uni-bielefeld.de> To: <zope@zope.org> Sent: Friday, August 29, 2003 4:41 PM Subject: [Zope] Re: Charset HTTP header switched to UTF-8. Bug or feature ?
Gilles Lenfant wrote:
There's a strange thing in a iso-8859-1 (natural) charset site Zope 2.6.1 powered...
A form is summitted (POST) to a TTW python script. At the end of the script, after form validation ...
<sample> return context.sometemplate(param1=value1, ...) </sample>
The "sometemplate" is published with this HTTP header :
Content-Type: text/html;charset=UTF-8
When nowhere in my scripts/templates, I stated to use that charset. You can imagine the ugly things that are displayed :-/
Does your script call a manage_*-method (manage_changePropeties for example, which alway sets the management-charset to UTF-8 since Zope 2.6.1) or does it catalog an item?
Hi Maik, You're right... When the page is POSTed from a form, the script makes some manage_changeProperties(...). I got to explicitely reset that charset to iso-8859-1 in the RESPONSE to get rid of this ugly display on non ASCII characters like é, ç, à (...). This is a strange choice. Zope "natural" charset is supposed to be iso-8859-1 and should always use that charset without further programmer notice. Cheers --Gilles