pub fn encode_uri_component(s: &str, escaping_dots: bool) -> String
JS’s encodeURIComponent: every UTF-8 byte but the letters, digits and -_.!~*'() as %XX; with escaping_dots, . too.
encodeURIComponent
-_.!~*'()
%XX
escaping_dots
.