Hi,
I am working on CSV export.
I have a function that returns a string.
output_string = StringIO.StringIO()
csv_writer = csv.writer(output_string, delimiter=';', quotechar='
',quoting
=csv.QUOTE_MINIMAL)
csv_writer.writerows(output)
contents = output_string.getvalue()
output_string.close()
return contents
In my controller i have:
response.headers["Content-Type"] = gluon.contenttype.contenttype(".csv")
+ ";charset=utf-8"
response.headers["Content-disposition"] = "attachment; filename="
+entry_class
.name + ".csv"
output = CSV.get_entries_content(entries,
entry_class_attributes,entries_values
)
return str(output)
But when content is outputed i get KljuÄŤ Ĺ˝itnjak when it should be ključ
žitnjak, how can i fix this?
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.