Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import os
from_e = 'utf-8'
to_e = 'gbk'
command = "iconv -f %s -t %s " % (from_e, to_e)
for i in os.listdir():
if i.endswith('.m3u'):
file_s = "\"%s\" > \"%s\"" % (i,to_e+i)
os.system(command+file_s)
os.remove(i)
os.rename(to_e+i,i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.