Closed Snaptags closed 9 years ago
P.S. If I convert the input file to ANSI everything seems to work!
From https://docs.python.org/3.4/library/csv.html?highlight=csv#module-csv :
Since open() is used to open a CSV file for reading, the file will by default be decoded into unicode using the system default encoding (see locale.getpreferredencoding()). To decode a file using a different encoding, use the encoding argument of open:
import csv
with open('some.csv', newline='', encoding='utf-8') as f:
reader = csv.reader(f)
for row in reader:
print(row)
Thanks!
I'm trying to create a slob file containing dictCC dictionary data, my "converter" looks like this:
Works just fine until I try to add a line with a German Umlaut in the 'value' column, slob.py raises a ValueError exception then.
Maybe you could more complex examples to the documentation, to enable python beginners to use slob.add? :-)
Any ideas on how to solve the problem?