URLencode               package:utils               R Documentation

_E_n_c_o_d_e _o_r _D_e_c_o_d_e _a (_p_a_r_t_i_a_l) _U_R_L

_D_e_s_c_r_i_p_t_i_o_n:

     Functions to encode or decode characters in URLs.

_U_s_a_g_e:

     URLencode(URL, reserved = FALSE)
     URLdecode(URL)

_A_r_g_u_m_e_n_t_s:

     URL: A character string.

reserved: should reserved characters be encoded?  See 'Details'.

_D_e_t_a_i_l_s:

     Characters in a URL other than the English alphanumeric characters
     and '$ - _ . + ! * ' ( ) ,' should be encoded as '%' plus a
     two-digit hexadecimal representation, and any single-byte
     character can be so encoded. (Multi-byte characters are encoded as
     byte-by-byte.)

     In addition, '; / ? : @ = &' are reserved characters, and should
     be encoded unless used in their reserved sense, which is scheme
     specific.  The default in 'URLencode' is to leave them alone,
     which is appropriate for 'file://' URLs, but probably not for
     'http://' ones.

_V_a_l_u_e:

     A character string.

_R_e_f_e_r_e_n_c_e_s:

     RFC1738, <URL: http://www.rfc-editor.org/rfc/rfc1738.txt>

_E_x_a_m_p_l_e_s:

     (y <- URLencode("a url with spaces and / and @"))
     URLdecode(y)
     (y <- URLencode("a url with spaces and / and @", reserved=TRUE))
     URLdecode(y)
     URLdecode("ab%20cd")

