We need to investigate whether there are cases where characters become misencoded. This may well be resolved, but we were seeing it in the early days of rake-pipeline and should investigate.
I just had the same problem in one of my projects. In my case, the cause was that the generated file had jquery and ember prepended, which do not contain any non-ASCII chars (ember does have the copyright char, but at the end of its file). As the integrated web server of rake pipeline does not seem to specify the encoding, browser sniffing fails, as the first non-ASCII char is found only very far into the file.
One solution is the following filter, prepending each file with a BOM:
class BOMFilter < Rake::Pipeline::Filter
def generate_output(inputs, output)
inputs.each do |input|
output.write("\uFEFF" + input.read)
Although I guess a better solution would be for the integrated webserver to specify the encoding for the served files.
I think we still have a misencoded copyright char in Ember.
Github downloads actually suffer the same problem as described by me earlier. For example, opening http://cloud.github.com/downloads/emberjs/ember.js/ember-0.9.7.1.js in a browser, will display the copyright char at the bottom incorrectly, as the Github download server does not send an encoding in the HTTP headers, and apparently the browser, after seeing the first X lines of pure ASCII, does not interpret it as UTF8.
If you download the same file directly, it is valid UTF8.