[Rd] UTF-8 and .Rd files

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Jun 29 08:54:53 CEST 2006


On Wed, 28 Jun 2006, Peter Dalgaard wrote:

> Paul Gilbert <pgilbert at bank-banque-canada.ca> writes:
>
>> I've been following this thread hoping for the definitive answer...
>>
>> Peter Dalgaard wrote:
>> ....
>>> Well, I do tend to think that we should just use utf, assuming that
>>> people have the relevant glyphs. If they don't, then they might get
>>> little hollow rectangles but so what?

Unfortunately, they might get nothing visible at all, and they might also 
get something completely wrong (happens on my Windows' X11 server on my 
laptop).  This is not an R problem but a question of the quality of 
implementation of UTF-8.  (Given the lack of UTF-8 fonts, I don't see the 
latter changing any time soon.)

My comments (at UseR and to Göran) are intended to make people aware just 
how badly things can go wrong: it is up to the users to decide if 
transliteration is worse than the chance of mangling.

>> My problem is that I put an ö in a reference in an Rd file, and now my
>> builds fail on some of my systems. I can switch which systems work and
>> which are broken, but I can not get it to work on all systems. I have
>> spent way too much time trying to figure out what is wrong. So, wrt "so
>> what", I need to choose between checking my packages on all the
>> different systems I use, or having an ö in the Rd file. I think my
>> problem is more complicated than having the relevant glyphs. I suspect
>> it has to do with having the same locale on all systems doing NFS
>> mounts, or on my cvs server, or something strange like that.
>
> Just to clarify, one thing is what I feel should be the longer term
> strategy, another is what the R build tools can currently do...
>
> Did you follow the advice to declare your input encoding with
> \encoding and use \enc to provide a transliteration?

It is necessary to do so.  I use a mixture of UTF-8 and latin1 locales on 
systems sharing a file system, and it all works for me: iconv does the 
charset translations transparently provided it knows what to do.

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