—— That often happens. ――If you have special characters and do it exactly, there may be a replacement table, but if you can see it for the time being, you want to convert it --Something happens every time, so make a note
python
src = open('src.csv')
csv = src.read()
src.close()
csv_utf = unicode(csv, 'utf-8')
csv_sjis = csv_utf.encode('cp932', 'replace')
dest = open('dest.csv', 'w')
dest.write(csv_sjis)
dest.close()
Recommended Posts