Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; '(python': 0.07; "subject:')": 0.09; 'subject:using': 0.09; 'received:209.85.218': 0.14; "'rb')": 0.16; 'subject:ignore': 0.16; 'so.': 0.16; 'to:name :python-list@python.org': 0.22; 'subject: .': 0.24; 'message- id:@mail.gmail.com': 0.30; 'file': 0.32; 'subject:with': 0.35; 'received:209.85': 0.35; 'received:google.com': 0.35; 'received:209': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=au9lWwxtTAUOY5kfOzT++Ou75a6rxPcp4uS2Aa3ZGfA=; b=Cq5O5xK4Dx2nj2UaMZ1I/ChTpEWhdYu2Yuukz+L15IttVnkCvugfZ1GMZAW5wlVqeo OoXM+N0TRKJMNW46Ohc7vpOc+wWNosZ/062PvHM2OQZ+mQD163v/xK+pvl6C2BN41hH6 fYNEfr8+y/uye9INoz5+iuhcCSKQLIzVr7XmHel+YBMNyEYLk/og3wT15aALZPfst8jj Mccy/Sc9bPLlg3MsTRE6A5FrJFsscgVUqhnTkZLjOp41LirSgoduJU7UUBISYtofPE3q UKhyfPOAyzb2/s7cAhJ/AKGrCQTecJeknERhrx86C9V4mdE7PMJhaKmzTcttZkD1z3hi 1ZEQ== X-Gm-Message-State: ALoCoQl+U2xzZyZA/1fUR4W4Ju0a9yfbY3UyzDIlA5B+cfJZU192MzyUV8rrdm3wzsJHh1uXCHZ+ X-Received: by 10.182.128.33 with SMTP id nl1mr15985557obb.3.1429016072406; Tue, 14 Apr 2015 05:54:32 -0700 (PDT) MIME-Version: 1.0 From: Vincent Davis Date: Tue, 14 Apr 2015 06:54:12 -0600 Subject: using DictReader() with .decode('utf-8', 'ignore') To: "python-list@python.org" Content-Type: multipart/alternative; boundary=e89a8ff2544c5fe1720513aebbfb X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 42 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1429016466 news.xs4all.nl 2918 [2001:888:2000:d::a6]:50878 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:88948 --e89a8ff2544c5fe1720513aebbfb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I had been reading in a file like so. (python 3) with open(dfile, 'rb') as f: for line in f: =E2=80=8Bline =3D line.decode('utf-8', 'ignore').split(',') =E2=80=8BHow can I =E2=80=8Bdo accomplish decode('utf-8', 'ignore') when re= ading with DictReader() Vincent Davis 720-301-3003 --e89a8ff2544c5fe1720513aebbfb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I had been reading in a file like so. (python 3= )
with open(df= ile, 'rb') as f:
=C2=A0 =C2=A0 for line in f:
= =C2=A0 =C2=A0 =C2=A0 =C2=A0
=E2=80=8Bline
= =C2=A0=3D line.decode('utf-8', 'ignore').split(',')=

=E2=80=8BHow can I =E2=80=8Bdo accomplish=C2=A0decode('utf-8', &= #39;ignore') when reading with=C2=A0DictReader()


Vincent Davis=C2=A0=
720-301-3003
--e89a8ff2544c5fe1720513aebbfb--