The R Project SVN R

Rev

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

Rev 68948 Rev 75106
Line 19... Line 19...
19
\arguments{
19
\arguments{
20
  \item{locale}{character string naming a locale.}
20
  \item{locale}{character string naming a locale.}
21
}
21
}
22
\details{
22
\details{
23
  The operation differs by OS.
23
  The operation differs by OS.
24
#ifdef windows
24
  \describe{
25
  A Windows locale is specified like \code{"English_United Kingdom.1252"}.
25
    \item{On Windows,}{a locale is specified like \code{"English_United Kingdom.1252"}.
26
  The final component gives the codepage, and this defines the encoding.
26
  The final component gives the codepage, and this defines the encoding.
27
#endif
27
    }
28
#ifdef unix
28
    \item{On Unix-alikes:}{
29
  Locale names are normally like \code{es_MX.iso88591}.  If final
29
  Locale names are normally like \code{es_MX.iso88591}.  If final
30
  component indicates an encoding and it is not \code{utf8} we just need
30
  component indicates an encoding and it is not \code{utf8} we just need
31
  to look up the equivalent encoding name.  Otherwise, the language
31
  to look up the equivalent encoding name.  Otherwise, the language
32
  (here \code{es}) is used to choose a primary or fallback encoding.
32
  (here \code{es}) is used to choose a primary or fallback encoding.
33
#endif
33
    }
34
 
34
  }
35
  In the \code{C} locale the answer will be \code{"ASCII"}.
35
  In the \code{C} locale the answer will be \code{"ASCII"}.
36
}
36
}
37
\value{
37
\value{
38
  A character vector naming an encoding and possibly a fallback
38
  A character vector naming an encoding and possibly a fallback
39
  single-encoding,  \code{NA} if unknown.
39
  single-encoding,  \code{NA} if unknown.