Rd files with different encoding
character-encoding, devtools, encoding, r, unicode
Solution
I suspect this encoding might not be well handled by R. If I copy paste your function in a fake package, remove the mention to your encoding in the Rd file and save it with encoding UTF-8 and add
Encoding: UTF-8
To the DESCRIPTION file it works fine (under linux, with UTF-8 local).
Problem
How do I specify encoding for rd file correctly? I'm trying to add the following help file documenting dummy function to my package: ``` \name{dummy} \encoding{ISO-8859-2} \alias{dummy} \title{Příšerně žluťoučký kůň úpěl ďábelské ódy.} \usage{ dummy(x) } \arguments{ \item{x}{Příšerně žluťoučký kůň úpěl ďábelské ódy.Příšerně žluťoučký kůň úpěl ďábelské ódy.} } \description{ Příšerně žluťoučký kůň úpěl ďábelské ódy.Příšerně žluťoučký kůň úpěl ďábelské ódy. } \examples{ dummy(x="Příšerně žluťoučký kůň úpěl ďábelské ódy.Příšerně žluťoučký kůň úpěl ďábelské ódy.") } ``` However, when I try to install my package (using `install` from `devtools`) I get: ``` Warning messages: 1: In fetch(key) : internal error -3 in R_decompress1 2: In strsplit(msg, "\n") : input string 1 is invalid in this locale ``` When I try `help(dummy)` I get: ``` Error in fetch(key) : lazy-load database '�' is corrupt ``` Any advice?