How is character encoding specified in a multipart/form-data HTTP POST request? : <p>The HTML 5 specification describes an <a href="http://www.w3.org/TR/2014/REC-html5-20141028/forms.html#multipart-form-data" rel="noreferrer">algorithm</a> for selecting the character encoding to be used in a multi-part form submission (e.g. UTF-8). However, it is not clear how the selected encoding should be relayed to the server so that the content can be properly decoded on the receiving end.</p>

<p>Often, character encodings are represented by appending a "charset" parameter to the value of the <code>Content-Type</code> request header. However, this parameter does not appear to be defined for the <code>multipart/form-data</code> MIME type:</p>

<p><a href="https://tools.ietf.org/html/rfc7578#section-8" rel="noreferrer">https://tools.ietf.org/html/rfc7578#section-8</a></p>

<p>Each part in a multipart form submission may provide its own <code>Content-Type</code> header; however, RFC 7578 notes that "in practice, many widely deployed implementations do not supply a charset parameter in each part, but rather, they rely on the notion of a 'default charset' for a multipart/form-data instance". </p>

<p>RFC 7578 goes on to suggest that a hidden "_charset_" form field can be used for this purpose. However, neither Safari (9.1) nor Chrome (51) appear to populate this field, nor do they provide any per-part encoding information.</p>

<p>I've looked at the request headers produced by both browsers and I don't see any obvious character encoding information. Does anyone know how the browsers are conveying this information to the server?</p>
