python编码问题怎么解决(python如何查看编码类型)
导读:python查看编码类型的方法:1、输入“import chardet”命令导入模块;2、输入“chardit=chardet.detect(c ”命令查看编码(c为要查看的编码),输出后的结果即为要查看的编码类型。...
python查看编码类型的方法:1 、输入“import chardet ”命令导入模块;2 、输入“chardit=chardet.detect(c) ”命令查看编码(c为要查看的编码) ,输出后的结果即为要查看的编码类型 。
查看编码类型
importchardet chardit1=chardet.detect(cf_r)#cf_r为要查看的编码 print(cf_r[encoding])创心域SEO版权声明:以上内容作者已申请原创保护,未经允许不得转载,侵权必究!授权事宜、对本内容有异议或投诉,敬请联系网站管理员,我们将尽快回复您,谢谢合作!