[Rd] Setting locale to support UTF-8
Prof Brian Ripley
ripley at stats.ox.ac.uk
Sun Dec 1 07:55:42 CET 2013
On 30/11/2013 20:09, Duncan Murdoch wrote:
> In Sweave, if the locale is set to C, non-ASCII characters are not
> handled nicely even if I declare the encoding of the file to be "UTF-8".
> I'm trying to find a workaround for this, because I'm using Sweave
> from within TeXShop. TeXShop runs its typesetting engines in the C
> locale, and non-ascii characters are messed up.
>
> Is there a way to declare that I am in a "generic" UTF-8 locale? It is
> like the C locale in other respects, but it knows about UTF-8 characters.
Locales are about more than encodings, but LC_CTYPE=en_US.UTF-8 will
works almost everywhere. The only place I know where it might give
trouble is Debian which micromanages glibc and makes installation of
locales optional.
But on a OS which supports UTF-8 locales it would be perverse not to
have a least one UTF-8 locale installed.
(There is also the issue of .UTF-8 vs .utf8, but I think everyone
accepts the first now.)
>
> Duncan Murdoch
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
--
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-devel
mailing list