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"))

  

相关文章:

  • 2021-11-03
  • 2022-01-07
  • 2021-05-29
  • 2021-06-27
  • 2021-09-27
  • 2019-07-26
  • 2021-08-08
  • 2021-11-14
猜你喜欢
  • 2021-10-27
  • 2021-11-07
  • 2021-10-05
  • 2021-04-23
  • 2021-10-09
  • 2022-01-07
  • 2021-11-18
  • 2021-06-28
相关资源
相似解决方案