#29511: Set the chartset on JavaScript catalog in Django Views i18n -------------------------------------------+------------------------ Reporter: Roland van Laar | Owner: nobody Type: Bug | Status: new Component: Generic views | Version: 1.11 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 UI/UX: 0 | -------------------------------------------+------------------------ What I want: set the charset on responses with javascript files.
The supposed way of doing that is setting the `DEFAULT_CHARSET` in settings.py. However, this setting isn't used when the `content_type` is specified when calling `HttpResponse`. It seems to me that this is a bug. Why accept `charset` as an option when it only does something when `content_type` is set. `django.views.i18n.JavascriptCatalog` sets this `text/javascript` as the content_type. Whereas it should be: `text/javascript; charset=utf-8`. -- Ticket URL: <https://code.djangoproject.com/ticket/29511> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/051.940e1d2caf584e7b283d332a6bb9ae30%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.