Commit feac1e0b by Ned Batchelder

Merge pull request #4498 from IONISx/tusbar/fix-dump-grades-unicode

Fix unicode issue
parents b54dd4d8 602988c3
......@@ -68,7 +68,7 @@ class Command(BaseCommand):
fp = open(fn, 'w')
writer = csv.writer(fp, dialect='excel', quotechar='"', quoting=csv.QUOTE_ALL)
writer.writerow(datatable['header'])
writer.writerow([unicode(s).encode('utf-8') for s in datatable['header']])
for datarow in datatable['data']:
encoded_row = [unicode(s).encode('utf-8') for s in datarow]
writer.writerow(encoded_row)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment