Subject: | form-data Content-Type doesn't seem to permit setting charset for individual content fields |
Although the HTML 4.01 spec and the HTTP 1.1 spec refer to being able to set the
charset for individual form-data encoded controls, POST in HTTP::Request::Common
doesn't seem to have any way of specifying the charset per field.
In particular, the content field might have wide characters that I want to encode
and transmit.
POST $url, Content => [ surname => encode('utf8',"Jędrejek"), b64_data => $base64_string
], Content_Type => 'form-data';
The receiving doesn't know what encoding was used for surname in the case above.
Perhaps the following syntax instead?
Content => [ surname => { Content => $encoded_string, Content_Type=> 'text/plain;
charset='utf8' }, b64_data => $base64_string ]
Regrettably I've no patch to offer. Perhaps there is a way to achieve this currently, but I didn't
work it out.