On 2009-02-18 12:14, Gabriel Rossetti wrote:
Hello,

I wrote some code to transform a raw XML string into a domish.Element, and I keep on getting char encoding/decoding errors :

[..]
           parser.parse(tmp.toXml())
> [..]

Parser input is expected to be a string, not unicode. Try this instead:

  parser.parse(tmp.toXml().encode('utf-8'))

ralphm

_______________________________________________
Twisted-Python mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to