Skip to content

Instantly share code, notes, and snippets.

View coder-tan's full-sized avatar

Tan Chunmao coder-tan

  • Chengdu, China
View GitHub Profile
@coder-tan
coder-tan / gist:cd127c6563dc702b86bf
Created March 3, 2016 08:47
convert text file encodings
# convert text file encoding
import codecs
import os
from shutil import copyfile
encoding_china = 'gb18030'
encoding_gbk = 'gbk'
encoding_source = encoding_china
encoding_target = 'utf-8'