title: Encoding error in JavaScript asset in Rails
body: <p>I have a Rails (version 3.2.1) project and I recently switched from Ruby 1.8.7 to Ruby 1.9.3. I added encoding comments in all <code>.rb</code> and <code>.erb</code> files but I have a problem with plain <code>.js</code> JavaScript assets. They contain comments in Polish saved with UTF-8 encoding. In most files it works fine - Ruby detects the encoding correctly - but in one file I have only a single UTF-8 character <code>ś</code> in a comment line. And now the Rails server fails with <code>Encoding::CompatibilityError</code> when displaying index page (which doesn't even reference the JavaScript file).</p>
  
  <p>I know it's a problem with Ruby's automatic encoding detection as it probably can't detect encoding from single character outside ASCII range, but it's very frustrating since it shouldn't matter anyway - the file is only linked to as an asset.</p>
  
  <p>My question is: how to enforce UTF-8 encoding in all <code>.js</code> assets?</p>