I have the following example string to make a function which will remove accents is an email header and I store it in the bd but since I get the header I get it that way
('Cotización pruebá ácentos')
string = m['subject']
self.remove_accents(string.decode('utf-8'))
the function that I have is the following
def remove_accents(self, s):
return ''.join(c for c in unicodedata.normalize('NFD', s) if
unicodedata.category(c) != 'Mn')
it removes the accents but it returns something like this
=?utf-8?b?q290axphy2nds24=?= =?utf-8?b?ihbydwviw6e
how do I decode the chain