title: UTF-8 encoding with form post and Spring Controller
body: <p>I am trying to submit a form, which has UTF8 characters inside it.
  The form looks like this:</p>
  
  <pre><code>&lt;form id="workflowPersistForm" accept-charset="UTF-8" method="post" action="/workflow-next"&gt;&gt;
    &lt;input id="stateGlobal" type="hidden" value=" お問い合わせ" name="state"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>My server is a spring based. My web.xml already has the Encoding Filter:</p>
  
  <pre><code> &lt;filter&gt;
       &lt;filter-name&gt;EncodingFilter&lt;/filter-name&gt;
       &lt;filter-class&gt;org.springframework.web.filter.CharacterEncodingFilter&lt;/filter-class&gt;
       &lt;init-param&gt;
           &lt;param-name&gt;encoding&lt;/param-name&gt;
           &lt;param-value&gt;UTF-8&lt;/param-value&gt;
       &lt;/init-param&gt;
       &lt;init-param&gt;
           &lt;param-name&gt;forceEncoding&lt;/param-name&gt;
           &lt;param-value&gt;true&lt;/param-value&gt;
       &lt;/init-param&gt;
   &lt;/filter&gt;
  </code></pre>
  
  <p>The problem is that the UTF-8 characters are getting messed up somewhere. I put a break point just at the start of controller, and the characters are messed up at that point itself. Also, if I generate UTF8 characters inside Controller, it gets rendered correctly in the browser. Just that on form post, the controller doesn't receive the characters properly.</p>
  
  <p>Any idea what I might be doing wrong?</p>
  
  <p>Edit: Looks like, in the new page data is not messed up, but its double encoded.
  I am unable to understand why it is double encoded.</p>
  
  <p>Edit 2: When I change the form to get instead of post, everything works perfectly. I have no idea what post is breaking.</p>