[Zope] utf-8 vs. unicode question(s)
Jürgen Herrmann
Juergen.Herrmann at XLhost.de
Fri May 6 13:40:56 EDT 2005
hi out there!
there's been some discussion about utf-8 vs. unicode strings on the
list lately. i'd like to ask if my gained understandings are correct
und thus possibly make it clear to others also.
i have set my python default encoding to utf-8, i always send http
responses from zope as utf-8 (by setting the header like this:
tal:define="dummy python:request.RESPONSE.\
setHeader('Content-Type','text/html;; charset=utf-8')"
)
so if i'd like to use unicode strings in my zope applications, it's
still necessary to convert request variables to unicode by using
unicode(REQUEST.foo, 'utf-8'), right?
as far as i understodd, the conversion back to utf-8 is handled
automagically by zope (if the abovementioned header is set), also
correct?
thanks in advance for your answers!
regards, juergen herrmann
_______________________________________________________________________
>> XLhost.de - eXperts in Linux hosting <<
Juergen Herrmann
Weiherweg 10, 93051 Regensburg, Germany
Fon: +49 (0)700 XLHOSTDE [0700 95467833]
Fax: +49 (0)721 151 463027
ICQ: 27139974 - IRC: #XLhost at quakenet
WEB: http://www.XLhost.de
More information about the Zope
mailing list