RMarkdown will render accented characters correctly in text, although it's awkward. For example, \grave{a} is coded $grave{a}$
To read in, and preserve, accented characters
A <- readLines(con <- file("~/projects/demo/input.txt"))
close(con)
A
#> [1] "liberté égalité fraternité"
Created on 2019-11-22 by the reprex package (v0.3.0)
(May @jennybryan forgive me, for some reason reprex doesn't play well with here.)
Be sure to save your Rmd file with UTF-8 encoding