import codecs import os #格式转换 fhanzi1 = codecs.open(os.path.join(outputpath,"hanzi1.txt"),"r") fhanzi = codecs.open(os.path.join(outputpath,"hanzi.txt"),"w") result_f = codecs.EncodedFile(fhanzi1,'utf-8','gbk') for chars in result_f: fhanzi.write(chars) fhanzi1.close() fhanzi.close() os.remove(os.path.join(outputpath,"hanzi1.txt"))
ascii文件转为utf-8格式
免责声明:文章转载自《ascii文件转为utf-8格式》仅用于学习参考。如对内容有疑问,请及时联系本站处理。
上篇DataTable添加单个或多个字段组成的主键,实现查找tslib1.4与Qt4.8.6的交叉编译与移植下篇
宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=