Description
I'm not a py3 coder, so this is regarding py2.
When trying to include a .csv file which is utf-8 encoded, the filter fails miserably as panflute expects unicode data (it calls text.encode('utf-8')
on line 338 of panflute/tools.py)
You are using the built in csv
module, which clearly states in the docs, that "The csv module doesn’t directly support reading and writing Unicode [...]". Aka, you should convert the read data to unicode before returning it as raw_table_list
in read_data()
at line 197 of pantable.py.
Or perhaps more preferrable, just use the unicodecsv module, which claims to be a "drop-in replacement for Python 2’s csv module which supports unicode strings without a hassle."
I tested unicodecsv in a local checkout, and it seems to work flawlessly. I just added import unicodecsv as csv
, not caring about anything than py2 :)