Escape all special characters (i.e. everything except for a-z, A-Z, 0-9, '-', '.', '_' or '~') for use in URLs.
curl_escape(url) curl_unescape(url)
url | A character vector (typically containing urls or parameters) to be encoded/decoded |
---|
# Escape strings out <- curl_escape("foo = bar + 5") curl_unescape(out)#> [1] "foo = bar + 5"# All non-ascii characters are encoded mu <- "\u00b5" curl_escape(mu)#> [1] "%C2%B5"curl_unescape(curl_escape(mu))#> [1] "µ"