python 如何判断 javascript 的源文件编码格式为UTF-8?
4条回答 默认 最新
- Bob-Happens 2015-01-13 07:48关注
import chardet f = open("/1.txt") s = f.read() print chardet.detect(s)
把文件路径换成js文件就可以了。
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
python 如何判断 javascript 的源文件编码格式为UTF-8?
import chardet
f = open("/1.txt")
s = f.read()
print chardet.detect(s)
把文件路径换成js文件就可以了。