3 ms·
I don't see the problem; reading and writing different encoding works fine. The CSV module makes no problems either: in_file = open("in.csv", 'r', encoding='
by minus7 10y ago
I don't see the problem; reading and writing different encoding works fine. The CSV module makes no problems either:
in_file = open("in.csv", 'r', encoding='latin-1')
in_csv = csv.reader(in_file)
out_file = open("out.csv", 'w', encoding='utf-8')
out_csv = csv.writer(out_file)
out_csv.writerows(row for row in in_csv)
- ianamartin 10y agoI have a persistent problem that does almost exactly that. The resulting file is not readable, and it makes me want to kick puppies and punch kittens.