This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients serhiy.storchaka, sparan
Date 2020-03-06.15:14:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1583507664.03.0.569910962639.issue39876@roundup.psfhosted.org>
In-reply-to
Content
csv.DictReader does not work with encodings. It works with already decoded strings.

You have to specify the correct encoding in open() (and "t" in mode is ignored):

with open(filename, "r", encoding="utf-8") as csvfile:

By default open() uses locale encoding. It is likely 'cp1252' on American and Western European Windows.
History
Date User Action Args
2020-03-06 15:14:24serhiy.storchakasetrecipients: + serhiy.storchaka, sparan
2020-03-06 15:14:24serhiy.storchakasetmessageid: <1583507664.03.0.569910962639.issue39876@roundup.psfhosted.org>
2020-03-06 15:14:24serhiy.storchakalinkissue39876 messages
2020-03-06 15:14:23serhiy.storchakacreate