In Rails 4.1, you can use the option :enforce_utf8 => false to disable the utf8 input tag.
However, I want to use this in Rails 3, so I defused my Rails. I put the following in the config / initializers directory.
# allow removing utf8 using enforce_utf8, remove after Rails 4.1 module ActionView module Helpers module FormTagHelper def extra_tags_for_form(html_options) authenticity_token = html_options.delete("authenticity_token") method = html_options.delete("method").to_s method_tag = case method when /^get$/i # must be case-insensitive, but can't use downcase as might be nil html_options["method"] = "get" '' when /^post$/i, "", nil html_options["method"] = "post" token_tag(authenticity_token) else html_options["method"] = "post" tag(:input, :type => "hidden", :name => "_method", :value => method) + token_tag(authenticity_token) end enforce_utf8 = html_options.delete("enforce_utf8") { true } tags = (enforce_utf8 ? utf8_enforcer_tag : ''.html_safe) << method_tag content_tag(:div, tags, :style => 'margin:0;padding:0;display:inline') end end end end
source share