如何使用python将扩展的字符(如:“,or”)转换为非扩展的ASCII字符(a,o,c)?它的工作方式应该是,如果它以"A,them,“作为输入,它将返回所有输入的A。
发布于 2013-03-28 23:15:01
统一码可能对你有用。
Python 3.2.3 (default, Jun 8 2012, 05:36:09)
[GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from unidecode import unidecode
>>> unidecode("æ, ö or ç")
'ae, o or c'https://stackoverflow.com/questions/15693756
复制相似问题