--- In zope@yahoogroups.com, "Daryl Daly" <daryld@...> wrote:
I have setup a test case which seems to show the problem. This test removes the database component.
New install of zope 2.10.2: Zope Version (Zope 2.10.2-final, python 2.4.4, linux2) Python Version 2.4.4 (#1, Oct 23 2006, 13:58:00) [GCC 4.1.1 20061011 (Red Hat 4.1.1-30)] System Platform linux2
I created a page template which contains: <html tal:define="dummy python:request.RESPONSE.setHeader('Content-Type', 'text/html;; charset=utf-8');" > <head> <title tal:content="template/title">The title</title> <meta http-equiv="content-type" content="text/html;charset=utf-8"> </head> <body tal:define="test_str python:u'This is a test \u00e9 \u00ae \u2022 \u2024 \u2219 \u03b2'.encode('utf-8')"> <span tal:content="test_str"></span> <form> <input name="t1" value="" tal:attributes="value test_str"> </form> </body> </html>
When this page is viewed in Firefox (v 1.5.0.9), it shows the characters correctly. When viewed in IE6, the non-ascii characters show as garbage.
If I add this to the zope.conf: <cgi-environment> HTTP_ACCEPT_CHARSET utf-8 </cgi-environment>
the non-ascii characters show correctly in IE6 (except one of them shows as a box - there is no 'garbage')
Is this zope.conf setup required for IE6 or am I doing something wrong?
Thanks, Daryl.
How about changing the following line 996 in /lib/python/zope/publisher/http.py ( as described in http://www.zope.org/Collectors/Zope/2280 ) header_present = 'HTTP_ACCEPT_CHARSET' in self.request to header_present = 'HTTP_ACCEPT_CHARSET' in self.request.keys() I think this is a bug. After doing that change, IE6 and IE7 behaved consistently. Regards Jost --------------------------------- Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.