[Twisted-web] Rendering unicode instances.

Syver Enstad twisted-web@twistedmatrix.com
28 Jan 2004 16:07:05 +0100


Andrew Bennetts <andrew-twisted@puzzling.org> writes:


> Well, there's no explicit unicode support in Twisted Web that I know of.
> 
> However, the workaround should be as simple as calling a method to set the
> response header for your desired encoding, and making sure you encode your
> unicode objects with that encoding before passing them to Twisted Web ;)

I feared that that was indeed the case.

> Perhaps Twisted Web should default to UTF-8, and automatically encode
> unicode objects with that encoding, unless a 'setUnicodeEncoding' method is
> called.  Obviously this would need to make sure the appropriate header is
> set.  Patches for this sort of thing are probably welcome :)

I'll probably implement such a thing to get things going.