For form/multipart-data, I've seen input that has the form =[2 to 6 hex chars]. I'm wondering which RFC defines it? I want to encode non-file form data to a binary char stream so that iconv doesn't produce bad output. I reckon the behavior is similar to formurl-encoded decoding.
Asked
Active
Viewed 64 times
0
-
I believe that when files are part of the stream, base64 encoding is usually involved (as well? in addition to? other?). – Jared Farrish Nov 05 '11 at 00:04
-
It's not base64. It's like urlencoded, but with = instead of % and the ability to have 2-6 trailing hex chars (as opposed to just 2). – moshbear Nov 05 '11 at 00:18
1 Answers
2
multipart/form-data
is based on RFC 2045 and RFC 2046, formalized in RFC 2388, and included in W3C standards HTML40 Section 13.4 and HTML5 Section 4.10.22.6. The encoding you are seeing is MIME's quoted-printable
encoding, which is defined in RFC 2045 Section 6.7. The quoted-printable
encoding operates on byte octets, and thus will ALWAYS contain 2 hex characters after a =
character (except for "soft" line breaks, which consist of a =
character followed by a CRLF line break).

Remy Lebeau
- 555,201
- 31
- 458
- 770