Python2's stdlib csv module is nice, but it doesn't support unicode. This module is a drop-in replacement which *does*. If you prefer python 3's semantics but need support in py2, you probably want https://github.com/ryanhiebert/backports.csv
Other
594
stars
87
forks
source link
Sniffer returns unicode but Reader expects bytes #35
Hi,
unicode.Sniffer
returnsunicode
delimiters when fed with aunicode
string, but that makesunicodecsv.reader
choke with this message:Here is a sample test that shows the problem:
It seems the problem only happens when a delimiter is found inside one of the input strings (
"Sandstone, no scavenging"
).Please note that commented lines fix the test.
Kind Regards,