| Line 6... |
Line 6... |
| 6 |
\name{URLencode}
|
6 |
\name{URLencode}
|
| 7 |
\alias{URLencode}
|
7 |
\alias{URLencode}
|
| 8 |
\alias{URLdecode}
|
8 |
\alias{URLdecode}
|
| 9 |
\title{Encode or Decode a (partial) URL}
|
9 |
\title{Encode or Decode a (partial) URL}
|
| 10 |
\description{
|
10 |
\description{
|
| 11 |
Functions to encode or decode characters in URLs.
|
11 |
Functions to percent-encode or decode characters in URLs.
|
| 12 |
}
|
12 |
}
|
| 13 |
\usage{
|
13 |
\usage{
|
| 14 |
URLencode(URL, reserved = FALSE, repeated = FALSE)
|
14 |
URLencode(URL, reserved = FALSE, repeated = FALSE)
|
| 15 |
URLdecode(URL)
|
15 |
URLdecode(URL)
|
| 16 |
}
|
16 |
}
|
| Line 24... |
Line 24... |
| 24 |
\details{
|
24 |
\details{
|
| 25 |
Characters in a URL other than the English alphanumeric characters and
|
25 |
Characters in a URL other than the English alphanumeric characters and
|
| 26 |
\samp{- _ . ~} should be encoded as \code{\%}
|
26 |
\samp{- _ . ~} should be encoded as \code{\%}
|
| 27 |
plus a two-digit hexadecimal representation, and any single-byte
|
27 |
plus a two-digit hexadecimal representation, and any single-byte
|
| 28 |
character can be so encoded. (Multi-byte characters are encoded
|
28 |
character can be so encoded. (Multi-byte characters are encoded
|
| 29 |
byte-by-byte.)
|
29 |
byte-by-byte.) The standard refers to this as \sQuote{percent-encoding}.
|
| 30 |
|
30 |
|
| 31 |
In addition, \samp{! $ & ' ( ) * + , ; = : / ? @ # [ ]} are reserved
|
31 |
In addition, \samp{! $ & ' ( ) * + , ; = : / ? @ # [ ]} are reserved
|
| 32 |
characters, and should be encoded unless used in their reserved sense,
|
32 |
characters, and should be encoded unless used in their reserved sense,
|
| 33 |
which is scheme specific. The default in \code{URLencode} is to leave
|
33 |
which is scheme specific. The default in \code{URLencode} is to leave
|
| 34 |
them alone, which is appropriate for \samp{file://} URLs, but probably
|
34 |
them alone, which is appropriate for \samp{file://} URLs, but probably
|