[Twisted-Python] Woven unicode

Alexander Winston alexander.winston at comcast.net
Mon Oct 6 21:17:09 EDT 2003


On Mon, 2003-10-06 at 20:07, Itamar Shtull-Trauring wrote:
> On Mon, 06 Oct 2003 19:29:55 -0400
> Rita Díaz y/o Rodrigo Benenson <rdrb at 123.cl> wrote:
> 
> >  def wmfactory_text(self, request):
> >     return u"eló"
> 
> (This is not legal Python unless you're using 2.3 and have specifically
> said your source code is iso-8859-1. It can break on other people's
> computers if they have other default encodings than yours. \u escapes
> will always work, of course. Not related to your problem though.)
> 
> Make sure you specify the encoding in your HTML document! I'm pretty
> sure that microdom (and thus woven) are semi-hardcoded to UTF8, so try
> saying that in your html page, and just returning unicode.

Part of the problem is that the XML declaration that Woven (possibly
Microdom?) spits out does not include the encoding.





More information about the Twisted-Python mailing list