title: Uploaded filename encoding issue for Japanese and Chinese
body: <p>I am currently using the <a href="https://github.com/blueimp/jQuery-File-Upload" rel="nofollow">jQuery-File-Upload</a>. I may upload some files with a Japanese or Chinese file name, and I can see that the file name is for example, "お疲れ様です.txt" or "测试文档.txt" in browser's debug mode, but in the backend(Java), they become "ã�Šç–²ã‚Œæ§˜ã�§ã�™.txt" and "æµ‹è¯•æ–‡æ¡£.txt".<br>
  I once tried to set <em>formAcceptCharset</em> to <strong>UTF-8</strong> but it does not work.<br>
  Question:<br>
  How to get the correct file name in Java side when parsing the MultipartFormData? </p>
  
  <p>Thanks in advance.</p>
  
  <p>BTW, The following is my data  </p>
  
  <pre><code>-----------------------------25382434931419
  Content-Disposition: form-data; name="file"; filename="ã?Šç–²ã‚Œæ§˜ã?§ã?™.txt"
  Content-Type: text/plain
  ....
  </code></pre>
  
  <p><strong><em>Add the Java codes</em></strong><br>
  In fact I did nothing in Java side currently, </p>
  
  <pre><code>@POST
  @Consumes(MediaType.MULTIPART_FORM_DATA)
  public String upload(InMultiPart inMP) {
      while (inMP.hasNext()) {
          InPart part = inMP.next();
          MultivaluedMap&lt;String, String&gt; headers = part.getHeaders();
          String fileName = null;
          if (!headers.containsKey("Content-Disposition")) {
              continue;
          } else {
              // get the file name here
              fileName = parseFileName(headers.getFirst("Content-Disposition"));
          }
          //.....
      }
      //......
  }
  
  private String parseFileName(String disposition) {
      int fileNameIndex = disposition.indexOf("filename=");
      if (fileNameIndex &lt; 0) {
          return null;
      }
      int start = disposition.indexOf("\"", fileNameIndex) + 1;
      int end = disposition.indexOf("\"", start);
      return  disposition.substring(start, end);
  }
  </code></pre>