#!/bin/python
import sys
if len(sys.argv) != 3:
print 'usage: python iso8859toutf8.py [infile] [outfile]'
sys.exit(0)
with open(sys.argv[2], 'w') as fout:
with open(sys.argv[1], 'r') as fin:
data = fin.read().decode('iso8859')
while data:
fout.write(data.encode('utf8'))
data = fin.read().decode('iso8859')
Aucun commentaire:
Enregistrer un commentaire