using DictReader() with .decode('utf-8', 'ignore')

Vincent Davis vincent at vincentdavis.net
Tue Apr 14 14:54:12 CEST 2015


I had been reading in a file like so. (python 3)
with open(dfile, 'rb') as f:
    for line in f:

​line
 = line.decode('utf-8', 'ignore').split(',')

​How can I ​do accomplish decode('utf-8', 'ignore') when reading with
 DictReader()


Vincent Davis
720-301-3003
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150414/4de3766c/attachment.html>


More information about the Python-list mailing list