pyton读取gbk格式txt
import os,codecs with codecs.open(path,'r','utf-8') as f: content = f.read() content = content.encode('utf-8').decode('utf-8') print(content)
本文来自博客园,作者:airgeek,转载请注明原文链接:https://www.cnblogs.com/airgeek/p/17480466.html
import os,codecs with codecs.open(path,'r','utf-8') as f: content = f.read() content = content.encode('utf-8').decode('utf-8') print(content)
本文来自博客园,作者:airgeek,转载请注明原文链接:https://www.cnblogs.com/airgeek/p/17480466.html