On Thursday 26 Sep 2002 4:38 pm, Arnar Lundesgaard wrote: > We can successfully store Norwegian characters > ('æ','ø', and 'å') in property fields, but when we reload the page, we > get results that display wrong.
Thats bad. I will definetely resolve this asap. > When studying the generated sources, we see that the data from ZOPE > inserted into the form is ISO-8859-1. what do you mean by "inserted into the form"? That the response contains a single byte where you properties contain character whose unicode value is greater than 127 ? how have you checked this? if so, thats a bug. > 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. This is a directive to tell zope when you submit the form that your browser will have encoded the form response using utf-8. Browsers stupidly dont put this information anywhere more suitable. What browser are you using? is it correctly using utf8 for this page? (for example, Mozilla has a View/Encoding menu that can override server-supplied encoding information) > 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 Those are supposed to be there. The first inserts the text/html;charset=utf-8 header into the management page. The second ensures that the dtml which computes this page content returns a unicode object. If the dtml returns a unicode object, then ZPublisher looks at the charset header to determine how to encode it. >, or are there problems in our setup. could be. please put ib/python/OFS/dtml/properties.dtml back the way is was originally, then send me 1. which browser you are using 2. a export file containing one object that demonstrates the problem. 3. a copy of the page obtained using wget or similar. (please dont use your browsers 'save' feature because that sometimes performs transcoding) _______________________________________________ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )