查看字符串的编码chardet 发表于 2014-12-22 | 分类于 Python | The Universal Character Encoding Detector1chardet.detect("str") 返回:1{‘confidence’:1.0,'encoding':'ascii'}