Re: [R] UTF-8 or Unicode on Windows PC

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Mon, 21 Apr 2008 10:33:22 +0100 (BST)

You didn't tell us your R version (or your locale). Windows has no UTF-8 locales, so a lot of work has had to be done to allow Unicode chars to be handled on Windows.

Please look into 2.7.0 RC, and in particular its CHANGES file at

https://svn.r-project.org/R/branches/R-2-7-branch/src/gnuwin32/CHANGES

On Mon, 21 Apr 2008, Hans-Joerg Bibiko wrote:

> Dear all,
>
> is it possible to set up RGUI or JGR on Windows PC to UTF-8 encoding?
>
> I looked for it in mailing lists and in the documentation, but I
> couldn't figure out it.
>
> My problem is e.g. to split a given string containing German and
> Russian words into characters.
> example:
>
> > a <- "asdШas"
> > strsplit(a,NULL)
> [[1]]
> [1] "a" "s" "d" "Ш" "a" "s"
>
> works on each Mac or Linux computer, but I didn't find a way for
> Windows.
>
> I tried to set options(encoding) to UTF-8, I tried to use the Perl
> mode in strsplit, but I had no success. At least by using JGR I was
> able to type Russian and see my text correctly but strsplit failed.
>
> I set RGUI to a Unicode font, no success.
>
> I tried to save a script file in UTF-8 or UTF-16 and I tried to run
> source(FILE, encoding="***"), no success.
>
> Is there really no way to use a Windows PC and R to work with Unicode
> texts?
>
> Many thanks in advance for each hint,
>
> --Hans
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
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


______________________________________________ R-help_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Received on Mon 21 Apr 2008 - 09:35:48 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 21 Apr 2008 - 10:30:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive