Sunday, June 15, 2008

codecs(python)

shift-jis --> utf-8

for line in open('test.txt').readlines():
print unicode(line, 'shift-jis', 'ignore').encode('utf-8')

No comments: