刚刚在list里看到有人问limodou老大以前写的简繁转换程序,就随手写了几行,试了下可以正确进行转换,也贴进了list:
#coding=gbk
chstr = "中文"
big5file = open("big5.txt","w")
big5file.write(chstr.decode("gbk").encode("big5"))
big5file.close()
txt = open("big5.txt").read()
gbfile = open("gb.txt","w")
gbfile.write(txt.decode("big5").encode("gbk"))
gbfile.close()