Removing unicode u2026 like characters in a string in python2.7

I have a string in python2.7 like this, This is some u03c0 text that has to be cleanedu2026! itu0027s annoying! How do i convert it to this, This is some text that has to be cleaned! its annoying! Answers: Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may … Read more

SyntaxError of Non-ASCII character

I am trying to parse xml which contains the some non ASCII cheracter, the code looks like 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 … Read more