如何将Unicode字符串(包含额外的字符,如£$等)转换为Python字符串?
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'
1.4m articles
1.4m replys
5 comments
57.0k users