title: encoding gets messed up when including file input in form
body: <p>I'm having an issue with the encoding of input from form elements being messed up when I include a file input in my form. I'm using jquery and a servlet backend(and ajax call), but I dont see how this should have anything to do with it. HTML page encoding is set to UTF-8, and I specify the character encoding for the servlet request to use utf8 as well. When I remove the file input from the form, the encoding is allright.</p>
  
  <p>When I investigate the headers for the request I see the following payload in firebug:</p>
  
  <pre><code>...
  ------WebKitFormBoundaryMxjJWBwBmPLxN623
  Content-Disposition: form-data; name="createActivityTitleInputId"
  
  Ã¦Ã¸Ã¥Ã¦Ã¸Ã¥Ã¦Ã¸Ã¥Ã¦Ã¸Ã¥
  ...
  </code></pre>
  
  <p>The content of the input should be æøåæøåæøå, and I do not know what the webkitformboundary stuff is...?</p>
  
  <p>I would very much appreciate it if someone could help me with this problem.</p>
  
  <p>Thanks :)</p>
  
  <p>----- EDIT------</p>
  
  <p>So I made a small test project to try to narrow down the issue. When I do not use ajax to post the form, everything works fine. If I however use the jQuery form plugin to submit the form then encoding fails...</p>
  
  <pre><code>form.ajaxSubmit({ 
          dataType: 'json',
          data: data,
          type: 'POST',
          success: function(response) {
              successfunction(response);
          }
      });
  </code></pre>
  
  <p>Anyone have any experience using this plugin?</p>