原文件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內容: