Mod_python and encoding problem
Johny
python at hope.cz
Sat Feb 3 07:24:49 EST 2007
I use a mod_python request handler and need the output( HTML pages)
to be in utf-8 encoding)
So, I added to my handler
req.content_type = 'text/html ;charset=utf-8'
req.write(''' <html>
....
...
(</html>""".decode('utf8').encode('utf8'))
The problem now is that when I try to call the handler , it is not run
properly but instead a download dialog is open I am asked where I
want to download that handler.
If I ,however,remove
charset=utf-8
from
req.content_type = 'text/html ;charset=utf-8'
handler works well but the utf-8 coding is not set properly
Can anyone help/explain?
Thanks
LL
More information about the Python-list
mailing list