Accademia:Conv to utf8.py: differenze tra le versioni

nessun oggetto della modifica
Nessun oggetto della modifica
Nessun oggetto della modifica
Riga 4: Riga 4:
def all_to_utf8(inputfile, inputenc):  
def all_to_utf8(inputfile, inputenc):  
     """Convert the text file encoding to utf8."""
     """Convert the text file encoding to utf8."""
     iso = open(inputfile, 'r', inputenc)
     text = open(inputfile, 'r', inputenc)
     utf = open('testo_utf', 'w') # to be modified
     utf = open('testo_utf', 'w') # to be modified
     for line in iso:
     for line in text:
         utf.write(line)
         utf.write(line)
     iso.close()
     text.close()
     utf.close()
     utf.close()
     #TODO
     #TODO
282

contributi