[Zope] strange unicode behaviour

Giuseppe Bonelli giuseppe.bonelli@tiscali.it
Thu, 24 Jul 2003 01:17:36 +0200


I have spent the last 30 minutes going crazy with this:

in dtml:
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
</head>
<dtml-call "getText()")>
</html>

in python:
def getText():
    s=u'a string with some accented chars'
    s=s.encode('utf-8')
    return s

the above works fine, but
return s.lower()

does not !!! (the accented chars are badly rendered in the browser).

Can someone, please, explain this to me??

I am on zope 2.6.1 (installed from binaries under win),

>From the python console everithing is OK, so there should be something
with Zope.
I have utf-8 as sys.defaultencoding and I do not load any locale when
starting Zope.

Thanks for any help,

--peppo