Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The csv module has it's fair share of quirks to be aware of as well, like not supporting Unicode.


...which is why I usually turn to this: https://pypi.python.org/pypi/unicodecsv/0.9.4

It's a "drop-in replacement for Python 2's csv module which supports unicode strings without a hassle."


Even in Python 3?


In Python3 it's completely fine, if you open the files with the correct encoding. For Python2, you've got to use UnicodeReader/Writer (and to open in binary mode): https://docs.python.org/2/library/csv.html?highlight=csv#exa...




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: