I think this is a problem with the knitr
package, which is used under the hood by rmarkdown
. You can reproduce with a similar document:
---
title: "Title"
output: html_document
---
"中文", "עברית", "english"
```{r}
c("中文", "עברית", "english")
```
Then, if you render this with:
knitr::knit("document.Rmd", encoding = "UTF-8")
a document will be generated called document.md
. If you open that file (using UTF-8 encoding), you'll see the unicode escape codes there.
I'll see if I can learn a bit more and if it is indeed something that could be handled on the knitr
side, I'll file an issue upstream.