28 Jan
2004
28 Jan
'04
8:39 a.m.
Donovan Preston
It's simple enough to implement. Here is what quotient does:
def render(self, request): request.setHeader("Content-type", 'text/html; charset=UTF-8')
return renderer.Renderer.render(self, request)
And then, when it wants to present a unicode string, it does:
theStr.encode('utf8')
I have a host of places that writes out string data, and which does so via woven, so I thought that wrapping the request output stream with an encoding wrapper would do nicely instead of having to find everywhere there could come a unicode string and then convert it explicitly. What about input? Form data and query strings.