import sys import chardet type = sys.getfilesystemencoding() #获取系统编码
f0 = open('./11.htm', 'r') html = f0.read()
type1 = chardet.detect(html) #获取网页编码 html.decode(type1).encode(type)
import sys import chardet type = sys.getfilesystemencoding() #获取系统编码
f0 = open('./11.htm', 'r') html = f0.read()
type1 = chardet.detect(html) #获取网页编码 html.decode(type1).encode(type)