Laszlo Nagy wrote:

>> Read the values as byte strings and decode afterwards.

Or monkey-patch:

import csv

def make_reader(fin, encoding="UTF-8"): 
    reader = csv.DictReader(fin)
    reader.reader = ([col.decode(encoding) for col in row] for row in 
reader.reader)
    return reader

fin = open("example.csv")
for record in make_reader(fin):
    print record

> Is there a plan to make csv reader compatible with unicode?

I don't know.

Peter 

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to