The error is 'ascii' codec can't encode character u'\xb0' in position
98: ordinal not in range(128) and it occurs when a temperature degree
such as 35°C
is in the text.

I'm using the following code in the view.py:

   response = HttpResponse(mimetype='text/csv')
    response['Content-Disposition'] = 'attachment;
filename=publication.csv'
    writer = csv.writer(response)
    writer.writerow(['Title', 'Authors', 'Year', 'Journal',
'Citation', 'Web Address'])
    for publication in publication_list:
        writer.writerow([publication.pubtitlestrip,
publication.pubauthors, publication.year, publication.journal,
publication.pubcitationnum, publication.pubwebaddress])
    return response

Is there someway to unicode the writer?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to