[EMAIL PROTECTED] wrote:
> I have this code:
> 
> import xml.parsers.expat
> parser = xml.parsers.expat.ParserCreate(encoding="UTF-8")
> text = unicode("<div>þórður</div>",'UTF-8')

I think you want
   text = u"<div>þórður</div>".encode('UTF-8')
so text is a UTF-8 string.

Kent
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to