4 ms·
Try this in Python? import codecs fin = codecs.open('input.txt', 'rb', 'shift-jis') fout = codecs.open('output.txt', 'wb', 'utf-8') t
by someone13 15y ago
Try this in Python?
import codecs
fin = codecs.open('input.txt', 'rb', 'shift-jis')
fout = codecs.open('output.txt', 'wb', 'utf-8')
try:
fout.write(fin.read())
except ValueError:
print "Not encoded using Shift-JIS!"
Not sure if that's what you mean - feel free to clarify, if not.