script does the job nicely.
import sys
import codecs
print(sys.getdefaultencoding())
print(sys.version_info)
raw = codecs.open(r'd:/u','rb','utf16')
out = []
for line in raw:
if line.lstrip():
out.append(line)
codecs.open(r'd:/uu','w','utf16').writelines(out)
print('OK')
No comments:
Post a Comment