pub fn urlencode(s: &[u8]) -> String
PHP urlencode: application/x-www-form-urlencoded (RFC 1738): alphanumerics and -_. are kept, a space is +, every other byte (including ~) is %XX.
urlencode
application/x-www-form-urlencoded
-_.
+
~
%XX