Hacker News new | ask | show | jobs
by abus 4422 days ago
I've used the Py2 csv module with csv files containing accented characters and had no issues. Could you post an example?

This works fine, as does the corresponding writer:

    reader = csv.reader(open(FILENAME, 'rb'))
    for row in reader:
        print row
If you want a unicode string it's as simple as:

    value = row[0].decode('utf8')
Then before writing:

    row[0] = value.encode('utf8')