[issue39876] csv.DictReader.fieldnames interprets unicode as ascii
Andreas Spar
report at bugs.python.org
Fri Mar 6 08:41:31 EST 2020
New submission from Andreas Spar <andreas.spar at gmx.de>:
with open(filename, "rt") as csvfile:
csv_reader = csv.DictReader(csvfile, delimiter=csv_delimiter)
filednames = csv_reader.fieldnames
In Python 3.8 csv expects utf-8 encoded files but apperently doens't read the header with utf-8 format.
If the csv file has an header named 'Französisch' it will be saved as 'Französisch'.
----------
components: Library (Lib)
messages: 363506
nosy: sparan
priority: normal
severity: normal
status: open
title: csv.DictReader.fieldnames interprets unicode as ascii
type: compile error
versions: Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39876>
_______________________________________
More information about the Python-bugs-list
mailing list