I am developing a package in RStudio using roxygen2 and in the object documentation I would like to cite references that have accented characters. I am following the instructions here. Unfortunately, the accented characters do not appear correctly when I view the documentation in my browser after building the package.
Here is the function with roxygen2 tags above:
#' A function called foo
#'
#' I want to cite a reference with accented characters in author's name:
#' \insertCite{Cube19}{justtestingonly}
#'
#' @param uhhh An object
#' @export
#' @encoding UTF-8
#' @references{\insertAllCited{}}
#' @importFrom Rdpack reprompt
foo <- function(uhhh) {}
Here is my bibtex entry in the file REFERENCES.bib in inst folder:
@ARTICLE{Cube19,
author={Thomas {\c C}{\"u}be},
title={article title},
journal={Journal of Stuff},
year={2019},
volume={1},
number={1},
pages={10--11},
}
My DESCRIPTION file includes the lines
Imports: Rdpack
RdMacros: Rdpack
Encoding: UTF-8
In my browser the citation appears as (Çübe 2019) rather than (Çübe 2019).