The http package may not correctly perform encoding conversion when the charset is specified as a quoted string, e.g. when the Content-Type header is specified as; text/xml; charset="UTF-8".
In case of the example above, the charset element in the state array ends up getting the value "utf-8" (including the quotes). This is interpreted by http::CharsetToEncoding as binary, resulting in no encoding conversion taking place.
The way I read RFC 2616 it is legal for charset to be specified as a quoted string.