[Twisted-web] Rendering unicode instances.

Syver Enstad twisted-web@twistedmatrix.com
28 Jan 2004 11:11:43 +0100


What does one do to render Unicode objects with twisted.web (I am
using woven also). I get UnicodeError's if I try to pass a unicode
object that contains characters not in ASCII today.

It would be nice if it was as simple as calling a method on the
request setting output encoding which set the encoding in the HTTP
headers and wrapped the output stream with an encoder that
transparently encoded Unicode objects with the chosen encoding. If
such a method is not implemented (I haven't seen one) what would be a good
way to solve this problem.