I suggest adding:
response.write(u'\ufeff'.encode('utf8'))
At this point any new software should certainly be writing out utf8
spreadsheets, and
the byte order mark is needed by various versions of MS Excel to properly
interpret the utf8 sheets.
--
Ticket URL: <https://code.djangoproject.com/ticket/22521>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* needs_better_patch: => 0
* resolution: => wontfix
* needs_tests: => 0
* needs_docs: => 0
Comment:
I'm not sure it's the role of Django to promote workaround hacks for
proprietary software. BOM markers seem to be controversial for UTF-8
files, so let's that for blogs or Django snippets.
I'm closing the ticket for now, but feel free to open a discussion on
django-dev mailing list, and reopen it if you get support.
--
Ticket URL: <https://code.djangoproject.com/ticket/22521#comment:1>