Protocols.HTTP.http_encode_query() does not encode strings correctly
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=4560
Reported by Martin Karlgren marty@roxen.com
According to RFC 3986, section 2.5, the last paragraph, URI (sub)strings should first be UTF-8-encoded and then percent-encoded. That's not the case with queries returned by http_encode_query().
Example:
> Protocols.HTTP.http_encode_query( ([ "foo":"räksmörgås" ]) );
(6) Result: "foo=r\344ksm\366rg\345s"
Expected result: "foo=r%c3%a4ksm%c3%b6rg%c3%a5s"