I am trying to do an xml parsing that contains some illiterate ASCII,
the code looks below
from lxml import etree from lxml import objectify content = u'<?xml version="1.0" encoding="utf-8"?><div>Order date : 05/08/2013 12:24:28</div>' mail.replace('\xa0',' ') xml = etree.fromstring(mail)
but it shows me an error in the line 'content = ...' like
syntaxError: Non-ASCII character '\xc2' in file /home/projects/ztest/responce.py on line 3, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
it works in the terminal, but while working on the Eclipse IDE it gives me an error.
I donβt know how to win.
python encoding xml-parsing lxml non-ascii-characters
OpenCurious Aug 6 '13 at 11:23 2013-08-06 11:23
source share