28 Jan
2004
28 Jan
'04
3:07 p.m.
Andrew Bennetts
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.