Skip to content

accented charatchers in a package manual

3 messages · Denis Talbot, Duncan Murdoch, Brian Ripley

#
On 14/11/2012 9:22 AM, Denis Talbot wrote:
You need to declare what encoding you are using.  Put a line in your 
DESCRIPTION file like

Encoding:  utf-8

If you don't know what encoding you are using, you can probably find out 
by reading the docs for your text editor, or just guess:  If you are on 
Windows it is likely latin1, on Linux it is likely utf-8.  If you guess 
wrong you'll get errors or ugly text when R produces the manual.

Duncan Murdoch
#
On 14/11/2012 15:24, Duncan Murdoch wrote:
But note the manual says

'Only encoding names latin1, latin2 and UTF-8 are known to be portable.'

'utf-8' is never correct and may or may not be accepted.

The error message 'Non-ASCII contents without declared encoding' (sic) 
occurs in processing Rd files.  So you would probably do better to add a 
\encoding{} line to the Rd file where the name occurs.  There are many 
examples in the R sources, e.g. src/library/graphics/man/text.Rd .