URLEncode converts characters as follows:
- Spaces ( ) are converted to plus signs (+).
- Non-alphanumeric characters are escaped to their hexadecimal representation.
Which is similar, but not exactly the same as W3C
application/x-www-form-urlencoded
This is the default content type. Forms submitted with this content type must be encoded as follows:
Control names and values are escaped. Space characters are replaced by '+', and then reserved characters are escaped as described in RFC1738, section 2.2: Non-alphanumeric characters are replaced by '%HH', a percent sign and two hexadecimal digits representing the ASCII code of the character. Line breaks are represented as "CR LF" pairs (i.e., '%0D%0A').
The control names/values are listed in the order they appear in the document. The name is separated from the value by '=' and name/value pairs are separated from each other by '&'.
My question is, has anyone done the work to determine whether URLEncode produces valid x-www-form-urlencoded data?