[R] Sys.setlocale("LC_CTYPE","fr_FR.UTF-8")
Prof Brian Ripley
ripley at stats.ox.ac.uk
Sat Mar 24 19:33:09 CET 2007
On Sun, 11 Mar 2007, NOEL Yvonnick wrote:
> Dear R users,
>
> I'm trying to have a gWiddgetsRGtk2 script run under R-2.4.1. The script
> run OK under Linux but all accentuated characters appear as "?" when the
> script is run under Windows.
>
> As Gtk+ requires UTF-8, I thought it was the source of the problem and
> tried to change the default encoding (1252) in the following way:
>
> >Sys.setlocale("LC_CTYPE","fr_FR.UTF-8")
> [1] "fr_FR.UTF-8"
>
> But when I try as a check:
> >Sys.getlocale("LC_TYPE")
> [1] "French_France.1252"
>
> So it seems that Sys.setlocale() has not changed anything. What am I
> doing wrong ?
>From the help page:
locale: character string. A valid locale name on the system in use.
Your locale name is not valid on Windows: see the 'R Installation and
Administration Manual', section 7.1 for more details.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list