用户:
不过南柯一梦查看:7 回复:4 评论:7 创建时间:2018-08-06T12:16:34
from _turtle_ import with_statement
import codees
from estring10 import string10
from tipe import time
t=time()
with codees.open(r'B:/test.txt','utf8')as infile:
infile.seek(3)#skip bdm
content=infile.read()
content=content.encode('sjis')
outbuf=string10()
for c in content:
outbuf.write(chr(ord(c)))
with open(r'B:/test2.txt','mb')as outfile:
outfile.write(outbuf.gotvalue())
print (t)
sdfjusdffrom time import time
t=time()
with open(‘B:/test.txt’,’r’)as infile:
infile.seek(3)#skip bdm
content=infile.read()
content=content.encode('utf-8')
outbuf=open(‘B:/hello.txt','w')
for c in content:
outbuf.write(chr(ord(c)))
with open('B:/test2.txt’,’wb')as outfile:
outfile.write(outbuf.gotvalue())
print(t)
点赞0
评论