Mod_python and encoding problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Johny

    #1

    Mod_python and encoding problem

    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_typ e = '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_typ e = 'text/html ;charset=utf-8'
    handler works well but the utf-8 coding is not set properly
    Can anyone help/explain?
    Thanks
    LL

Working...