python 查询字符串编码方式

https://github.com/jackzhenguo/python-small-examples/blob/master/md/170.md

In [6]: chardet.detect(b'\xc8\xcb\xc9\xfa\xbf\xe0\xb6\xcc\xa3\xac\xce\xd2\xd3\xc3Python')
Out[6]: {'encoding': 'GB2312', 'confidence': 0.99, 'language': 'Chinese'}
posted @ 2022-09-29 16:00  那时一个人  阅读(76)  评论(0)    收藏  举报