encode
Encodes characters in the given string as '%'-escaped octets using the UTF-8 scheme. Leaves letters ("A-Z", "a-z"), numbers ("0-9"), and unreserved characters ("_-!.~'()*") intact. Encodes all other characters.
Return
an encoded version of s suitable for use as a URI component, or null if s is null
Parameters
string to encode
Encodes characters in the given string as '%'-escaped octets using the UTF-8 scheme. Leaves letters ("A-Z", "a-z"), numbers ("0-9"), and unreserved characters ("_-!.~'()*") intact. Encodes all other characters with the exception of those specified in the allow argument.
Return
an encoded version of s suitable for use as a URI component
Parameters
string to encode
set of additional characters to allow in the encoded form, null if no characters should be skipped