Zope: 2.10.2
Python: 2.4.4

I am not sure if this is a zope problem or a browser problem or a lack of
my understanding of webservers and/or utf-8 & unicode but here it is:

I have a page template with a form and a textarea input element. The value
for the element comes from a database (MySQL) field. The database field
contains utf-8 encoded text (includes the bullet and registered
characters). When the page is displayed in Firefox (version it
displays fine. However when the page is displayed in IE 6 (or 7), it shows
garbage characters for the bullet and registered characters.

What I find as strange is that if the same field is displayed as just text
(i.e. just in a td element rather than in an input element) it displays
fine in IE.

My page template has the following headers:
<html metal:define-macro="page"
  tal:define="dummy python:request.RESPONSE.setHeader('Content-Type',
'text/html;; charset=utf-8');" >
   <meta http-equiv="content-type" content="text/html; charset=utf-8">

Firefox reports the page encoding as UTF-8 with meta:
content-type text/html; charset=utf-8

Input element:
            <textarea cols="50" name="detail_desc" rows="10"
                      tal:content="record/detail_desc |

I have also tried adding accept-charset="utf-8" to the form element

I have been able to fix the problem by adding this to my zope.conf:

I don't understand why this "fixes" the problem or if it is the correct
way to resolve this.

Any comments would be appreciated

Daryl Daly, B.Sc.
Chief Programmer/Business Analyst

Norco Products Ltd.                 Really Cool Bikes!!!

    Norco            __O            Tel:   604-552-2930 ext 205
 Performance        =\ \            Fax:   604-552-2948
    Bikes         (=)/(=)                  www.norco.com

1465 Kebet Way, Port Coquitlam, British Columbia, V3C 6L3
Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to