Skip to content

Instantly share code, notes, and snippets.

@kimdwkimdw
Created August 5, 2017 11:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kimdwkimdw/c1f48a6b0ed9ac3f128ce8bfb4aa8819 to your computer and use it in GitHub Desktop.
Save kimdwkimdw/c1f48a6b0ed9ac3f128ce8bfb4aa8819 to your computer and use it in GitHub Desktop.
from glob import glob
for filename in glob("[!utf8_]*"):
with open(filename, encoding="cp949") as fr, \
open("utf8_" + filename, encoding="utf-8", mode="w") as fw:
fw.writelines(fr.readlines())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment