[Zope-dev] [ZOPE 2.6 B1] Unicode/locale problems with OFS/dtml/properties.dtml
Arnar Lundesgaard
arnar.lundesgaard@creuna.no
Thu, 26 Sep 2002 17:38:07 +0200
We are trying out 2.6 b1. So far it seems very snappy (!!), and the
new error-log object is exceptionally usefull! Kudos to Zope Corp and
the community. :-)
While trying the beta we have found a few problems in the handling of
propertysheets. We can successfully store Norwegian characters
('æ','ø', and 'å') in property fields, but when we reload the page, we
get results that display wrong.
When studying the generated sources, we see that the data from ZOPE
inserted into the form is ISO-8859-1.
OTOH this field is inserted in the html-header:
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
Therefore the browser tries to display utf-8, which of course becomes
garbage when you get an ISO-8859-1 character with a larger value than
127.
All other pages (than the "properies" tab) in the have <meta
http-equiv="content-type" content="text/html;charset=ISO-8859-1">
Secondly, the type attribute of all inputfields contain an extra
':utf8:' that we assumed is a server directive to interpret the
contents as UTF-8. This apperently what crashes when storing the
second time.
lib/python/OFS/dtml/properties.dtml contains the following that seems
to us to be debug code:
<dtml-call "REQUEST.set('management_page_charset','UTF-8')">
<dtml-var "u''">
and several ':utf8:' directives.
When we removed those, it worked fine. Was this dtml-method merged in
mistakenly, or are there problems in our setup.
Arnar Lundesgaard
-------------------------------------------------------
phone: (+47) 982 38 036
mailto:arnar.lundesgaard(at)creuna.no
Creuna as
Bryggegata 3
NO-0250 Oslo
phone office: (+47) 23 23 88 00
fax: (+47) 23 23 88 50
http://www.creuna.no/