【发布时间】:2020-05-02 08:00:46
【问题描述】:
有什么方法可以在python中使用编解码器找到字节字符串中使用的编码类型。 chardet中有一个方法chardet.detect(string)['encoding']codecs python中有没有类似的方法
【问题讨论】:
-
为什么不使用 chardet?
-
如果标准库中有这样的方法,chardet 很可能不存在。
-
这能回答你的问题吗? How to detect string byte encoding?