The R Project SVN R

Rev

Rev 61160 | Rev 67599 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 61160 Rev 66302
Line 19... Line 19...
19
  \item{reserved}{should reserved characters be encoded?  See
19
  \item{reserved}{should reserved characters be encoded?  See
20
    \sQuote{Details}.}
20
    \sQuote{Details}.}
21
}
21
}
22
\details{
22
\details{
23
  Characters in a URL other than the English alphanumeric characters and
23
  Characters in a URL other than the English alphanumeric characters and
24
  \samp{$ - _ . + ! * ' ( ) ,} should be encoded as \code{\%}
24
  \samp{- _ . ~} should be encoded as \code{\%}
25
  plus a two-digit hexadecimal representation, and any single-byte
25
  plus a two-digit hexadecimal representation, and any single-byte
26
  character can be so encoded. (Multi-byte characters are encoded as
26
  character can be so encoded. (Multi-byte characters are encoded as
27
  byte-by-byte.)
27
  byte-by-byte.)
28
 
28
 
29
  In addition, \samp{; / ? : @ = &} are reserved characters, and should
29
  In addition, \samp{! $ & ' ( ) * + , ; = : / ? @ # [ ]} are reserved
30
  be encoded unless used in their reserved sense, which is scheme
30
  characters, and should be encoded unless used in their reserved sense,
31
  specific.  The default in \code{URLencode} is to leave them alone, which
31
  which is scheme specific.  The default in \code{URLencode} is to leave
32
  is appropriate for \samp{file://} URLs, but probably not for
32
  them alone, which is appropriate for \samp{file://} URLs, but probably
33
  \samp{http://} ones.
33
  not for \samp{http://} ones.
34
}
34
}
35
\value{
35
\value{
36
  A character string.
36
  A character string.
37
}
37
}
38
\references{
38
\references{
39
  RFC1738, \url{http://www.rfc-editor.org/rfc/rfc1738.txt}
39
  RFC 3986 \url{http://tools.ietf.org/html/rfc3986}
40
}
40
}
41
\examples{
41
\examples{
42
(y <- URLencode("a url with spaces and / and @"))
42
(y <- URLencode("a url with spaces and / and @"))
43
URLdecode(y)
43
URLdecode(y)
44
(y <- URLencode("a url with spaces and / and @", reserved = TRUE))
44
(y <- URLencode("a url with spaces and / and @", reserved = TRUE))