Encode a query value containing an accent, spaces and an ampersand
Example input
café & teaExpected result
caf%C3%A9%20%26%20teaURI-component encoding represents the accented letter with its UTF-8 bytes and protects the ampersand so it remains part of the value. Add the result as one parameter value, not as a replacement for an entire URL. The URL parser is the better choice when you need to inspect or edit several existing query parameters.