Latin-1 for Rails
1 2 class ApplicationController < ActionController::Base 3 before_filter :configure_charsets 4 5 def configure_charsets 6 if request.xhr? 7 @response.headers["Content-Type"] ||= "text/javascript; charset=iso-8859-1" 8 else 9 @response.headers["Content-Type"] ||= "text/html; charset=iso-8859-1" 10 end 11 end 12 13 end
...and it's also a good idea to explicitly specify the charset in the HTML (see below)
1 2 <meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" />