Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

encodeURI

URI encoding/decoding


Description

Encodes/decodes strings using URI encoding/decoding in the same way that web browsers do. The precise behaviors of these functions can be found at developer.mozilla.org: encodeURI, encodeURIComponent, decodeURI, decodeURIComponent

Usage

encodeURI(value)

encodeURIComponent(value)

decodeURI(value)

decodeURIComponent(value)

Arguments

value

Character vector to be encoded or decoded.

Details

Intended as a faster replacement for utils::URLencode() and utils::URLdecode().

encodeURI differs from encodeURIComponent in that the former will not encode reserved characters: ;,/?:@&=+$

decodeURI differs from decodeURIComponent in that it will refuse to decode encoded sequences that decode to a reserved character. (If in doubt, use decodeURIComponent.)

For encodeURI and encodeURIComponent, input strings will be converted to UTF-8 before URL-encoding.

Value

Encoded or decoded character vector of the same length as the input value. decodeURI and decodeURIComponent will return strings that are UTF-8 encoded.


httpuv

HTTP and WebSocket Server Library

v1.6.1
GPL (>= 2) | file LICENSE
Authors
Joe Cheng [aut], Winston Chang [aut, cre], RStudio, PBC [cph], Hector Corrada Bravo [ctb], Jeroen Ooms [ctb], Andrzej Krzemienski [cph] (optional.hpp)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.