python解决 “windows-1252”乱码

import chardet
strs = "bema schwimmfl gel gr÷▀e 0"
a = chardet.detect(strs) #windows-1252
str2 = strs.decode('windows-1252')
str2.encode('utf-8')
print str2

评论

暂无评论