Encode filename in MultipartEntityBuilder
<p>I am trying a file upload API using HttpPost and MultipartEntityBuilder. Following is the code I have used.</p>

<pre><code>MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.setCharset(MIME.UTF8_CHARSET);
builder.addBinaryBody(&lt;fileFieldName&gt;, &lt;byteArray&gt;, ContentType.TEXT_PLAIN, &lt;fileName&gt;);
</code></pre>

<p>File gets uploaded correctly. But when file name contains non-ASCII characters, it gets uploaded with name "????.jpg". Tried the solution given here <a href="https://stackoverflow.com/a/25870301/3271472">https://stackoverflow.com/a/25870301/3271472</a>. But it didn't solve my problem. Please assist. </p>