原文件temp.txt内容:
with open('C:\\Users\\Administrator\\Desktop\\temp.txt', 'r') as file_in:
with open('C:\\Users\\Administrator\\Desktop\\temp1.txt', 'w') as file_out:
file_out.write(file_in.read().decode('utf-8').encode('gbk'))
输出文件temp1.txt内容: