williamtroup williamtroup - 2 years ago 105
Python Question

Convert a Unicode string to a string in Python (containing extra symbols)

How do you convert a Unicode string (containing extra characters like £ $, etc.) into a Python string?

Answer Source
title = u"Klüft skräms inför på fédéral électoral große"
import unicodedata
unicodedata.normalize('NFKD', title).encode('ascii','ignore')
'Kluft skrams infor pa federal electoral groe'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download