csv reader

Emmanuel manouchk at gmail.com
Tue Dec 15 16:24:07 EST 2009


I have a problem with csv.reader from the library csv. I'm not able to
import accentuated caracters. For example, I'm trying to import a
simple file containing a single word "equação" using the following
code:

import csv
arquivoCSV='test'
a=csv.reader(open(arquivoCSV),delimiter=',')
tab=[]
for row in a:
    tab.append(row)
print tab

As a result, I get:

[['equa\xe7\xe3o']]

How can I solve this problem?



More information about the Python-list mailing list