Removing "utf8=✓" from Rails 3 form submissions

form_tag in Rails 4.2 (and probably earlier) has a :enforce_utf8 option;

If set to false, a hidden input with name utf8 is not output.

(Same as https://stackoverflow.com/a/28201543/430695)


Even though you aren't doing anything with the parameter, Rails is. It's to correct some issues in IE's parameter encoding. Yehuda has more info here:

What is the _snowman param in Ruby on Rails 3 forms for?


Once you understand the purpose of the Rails UTF-8 param, and for some reason you still need to remove it, the solution is easier than you think...just don't use the form_tag helper:

<form action="<%= search_path %>" method="get">
  <%= text_field_tag :q, params[:q] %>
  <%= submit_tag "search", :name => nil %>
</form>