[Twisted-Python] Woven unicode

Bob Ippolito bob at redivi.com
Mon Oct 6 19:42:42 EDT 2003

On Monday, Oct 6, 2003, at 19:29 America/New_York, Rita Díaz y/o 
Rodrigo Benenson wrote:

>  def wmfactory_text(self, request):
>     return u"eló"
> What I have to do to get the string looking good on the web browser?
> I have tryed using a meta tag to indicate iso-8859-1 coding and 
> replaced
> u"eló" by u"eló".encode("iso-8859-1"); but that does not work too.

u"eló".encode('ascii', 'xmlcharrefreplace')

It's not the most elegant solution in the world, but it should work.


More information about the Twisted-Python mailing list