From ripley at stats.ox.ac.uk  Thu Jun 29 08:54:53 2006
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Thu, 29 Jun 2006 07:54:53 +0100 (BST)
Subject: [Rd] UTF-8 and .Rd files
In-Reply-To: <x2wtb1564x.fsf@turmalin.kubism.ku.dk>
References: <148ed8180606270230s31e957e6r15fc346bf85183d7@mail.gmail.com>
	<Pine.LNX.4.64.0606271103260.9176@gannet.stats.ox.ac.uk>
	<148ed8180606270546m73d30f60yf8f1f33d8c874616@mail.gmail.com>
	<44A14925.3040707@cimr.cam.ac.uk> <44A17269.5010803@pdf.com>
	<148ed8180606271130w44024df3w49aa3340b8a107d6@mail.gmail.com>
	<x28xnixq02.fsf@turmalin.kubism.ku.dk>
	<44A2E90A.2080506@bank-banque-canada.ca>
	<x2wtb1564x.fsf@turmalin.kubism.ku.dk>
Message-ID: <Pine.LNX.4.64.0606290743500.21841@gannet.stats.ox.ac.uk>

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


[Rd] UTF-8 and .Rd files
Prof Brian Ripley