- 博客(2)
- 资源 (1)
- 收藏
- 关注
原创 python语言\xe6\x97\xa0\xe6\xb3\x95\xe5\x8a\xa0\xe8乱码字符转换
在hhvm错误日志中发现一段乱码,想要知道内容,用python实现了乱码的转换。乱码如下'\xe6\x97\xa0\xe6\xb3\x95\xe5\x8a\xa0\xe8\xbd\xbd\xe6\x8e\xa7\xe5\x88\xb6\xe5\x99\xa8:Index.php'安装了pip安装了 chardet然后在shell窗口操作>>>import ch
2017-04-25 14:17:40
41482
1
转载 python 字符集编码检测(转载修改)
>>> import chardet>>> chardet.detect(b'\\xc5\\xc0\\xb3\\xe6'){'encoding': 'ascii', 'confidence': 1.0, 'language': ''}123123chardet.detect()返回字典,其中confidence是检测精确度,encoding是编码形式\xc5\xc0\xb3\x
2017-04-25 10:07:12
557
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人