| Line 39... |
Line 39... |
| 39 |
|
39 |
|
| 40 |
\code{enc2native} and \code{enc2utf8} convert elements of character
|
40 |
\code{enc2native} and \code{enc2utf8} convert elements of character
|
| 41 |
vectors to the native encoding or UTF-8 respectively, taking any
|
41 |
vectors to the native encoding or UTF-8 respectively, taking any
|
| 42 |
marked encoding into account. They are \link{primitive} functions,
|
42 |
marked encoding into account. They are \link{primitive} functions,
|
| 43 |
designed to do minimal copying.
|
43 |
designed to do minimal copying.
|
| 44 |
|
44 |
|
| 45 |
There are other ways for character strings to acquire a declared
|
45 |
There are other ways for character strings to acquire a declared
|
| 46 |
encoding apart from explicitly setting it (and these have changed as
|
46 |
encoding apart from explicitly setting it (and these have changed as
|
| 47 |
\R has evolved). Functions \code{\link{scan}},
|
47 |
\R has evolved). Functions \code{\link{scan}},
|
| 48 |
\code{\link{read.table}}, \code{\link{readLines}}, and
|
48 |
\code{\link{read.table}}, \code{\link{readLines}}, and
|
| 49 |
\code{\link{parse}} have an \code{encoding} argument that is used to
|
49 |
\code{\link{parse}} have an \code{encoding} argument that is used to
|
| Line 72... |
Line 72... |
| 72 |
their \code{fixed} and \code{perl} options, \code{\link{strsplit}},
|
72 |
their \code{fixed} and \code{perl} options, \code{\link{strsplit}},
|
| 73 |
\code{\link{sub}} and \code{gsub} will give a marked UTF-8 result if
|
73 |
\code{\link{sub}} and \code{gsub} will give a marked UTF-8 result if
|
| 74 |
any of the inputs are UTF-8.
|
74 |
any of the inputs are UTF-8.
|
| 75 |
|
75 |
|
| 76 |
\code{\link{paste}} and \code{\link{sprintf}} return elements marked
|
76 |
\code{\link{paste}} and \code{\link{sprintf}} return elements marked
|
| 77 |
as bytes if any of the corresponding inputs is marked as bytes, and
|
77 |
as bytes if any of the corresponding inputs is marked as bytes, and
|
| 78 |
otherwise marked as UTF-8 of any of the inputs is marked as UTF-8.
|
78 |
otherwise marked as UTF-8 of any of the inputs is marked as UTF-8.
|
| 79 |
|
79 |
|
| 80 |
\code{\link{match}}, \code{\link{pmatch}}, \code{\link{charmatch}},
|
80 |
\code{\link{match}}, \code{\link{pmatch}}, \code{\link{charmatch}},
|
| 81 |
\code{\link{duplicated}} and \code{\link{unique}} all match in UTF-8
|
81 |
\code{\link{duplicated}} and \code{\link{unique}} all match in UTF-8
|
| 82 |
if any of the elements are marked as UTF-8.
|
82 |
if any of the elements are marked as UTF-8.
|