sstephenson/sprockets — Issue #285: Middleware: Send charset (DUP of missing #253)
Author: der-flo
Created: 2012-01-24 16:38:00+00:00
State: open

The original issue #253 is missing, so I'm posting it here again. Perhaps I did not respond fast enough etc. - shame on me, sorry for that.

---

The JavaScript files in my development environment aren't delivered with a charset. I can configure my production-nginx to do so, but we need a solution for our development env. So the sprockets middleware should be able to send the charset via the "Content-Type" header. Any suggestions?

josh commented

> JS is always utf-8 so you shouldn't need it.

This statement is new to me, are you serious? Can anybody provide further information on this?
To be concrete: A sprockets-delivered JS file of mine is encoded in UTF-8 and contains some characters outside US-ASCII. These characters e.g. aren't rendered correctly in my Safari browser when viewing this JS file directly. So Safari ignores the encoding defaulting to UTF-8?

Thanks for ideas!