The R Project SVN R

Rev

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

Rev 80116 Rev 80172
Line 100... Line 100...
100
  \code{enc2native} in UTF-8 and Latin-1 locales.
100
  \code{enc2native} in UTF-8 and Latin-1 locales.
101
}
101
}
102
\examples{
102
\examples{
103
## x is intended to be in latin1
103
## x is intended to be in latin1
104
x. <- x <- "fa\xE7ile"
104
x. <- x <- "fa\xE7ile"
105
Encoding(x.) # "unknown" (Linux) | "latin1" (Win 32 server) | ....
105
Encoding(x.) # "unknown" (UTF-8 loc.) | "latin1" (8859-1/CP-1252 loc.) | ....
106
Encoding(x) <- "latin1"
106
Encoding(x) <- "latin1"
107
x
107
x
108
xx <- iconv(x, "latin1", "UTF-8")
108
xx <- iconv(x, "latin1", "UTF-8")
109
Encoding(c(x., x, xx))
109
Encoding(c(x., x, xx))
110
c(x, xx)
110
c(x, xx)