[Zope] strange unicode behaviour
Giuseppe Bonelli
giuseppe.bonelli@tiscali.it
Thu, 24 Jul 2003 01:36:44 +0200
But why without s.lower() everything is ok ?
Thanks for the reply, hugo.
--peppo
PS: apologize for the double posting of the original message.
> -----Original Message-----
> From: Hugo Filipe Ramos [mailto:ml@zopers.org]
> Sent: gioved=EC 24 luglio 2003 1.25
> To: giuseppe.bonelli@tiscali.it
> Cc: zope@zope.org
> Subject: Re: [Zope] strange unicode behaviour
>
>
>
> What about using this line inside your <head> block?
> <meta http-equiv=3D"Content-Type" content=3D"text/html;
> charset=3Diso-8859-1">
>
> and setting it to your zone encoding?
>
>
> Regards
>
> HR
>
>
>
> ----- Original Message -----
> From: "Giuseppe Bonelli" <giuseppe.bonelli@tiscalinet.it>
> To: <zope@zope.org>
> Sent: Thursday, July 24, 2003 12:17 AM
> Subject: [Zope] strange unicode behaviour
>
>
> > I have spent the last 30 minutes going crazy with this:
> >
> > in dtml:
> > <html>
> > <head>
> > <meta http-equiv=3D"content-type" content=3D"text/html;charset=3Dutf-=
8">
> > </head>
> > <dtml-call "getText()")>
> > </html>
> >
> > in python:
> > def getText():
> > s=3Du'a string with some accented chars'
> > s=3Ds.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
> >
> >
> > _______________________________________________
> > Zope maillist - Zope@zope.org
> > http://mail.zope.org/mailman/listinfo/zope
> > ** No cross posts or HTML encoding! **
> > (Related lists -
> > http://mail.zope.org/mailman/listinfo/zope-announce
> > http://mail.zope.org/mailman/listinfo/zope-dev )
>