using DictReader() with .decode('utf-8', 'ignore')
vincent at vincentdavis.net
Tue Apr 14 15:37:53 CEST 2015
> Which DictReader? Do you mean the one in the csv module? I will assume so.
> # untested
> with open(dfile, 'r', encoding='utf-8', errors='ignore', newline='') as f:
> reader = csv.DictReader(f)
> for row in reader:
What you have seems to work, now I need to go find my strange symbols that
are not 'utf-8' and see what happens
I was thought, that I had to open with 'rb' to use encoding?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list