I'm writing a html report with rmarkdown. Inside it, there is an interactive data table, made with R's "DT" package.
library(DT)
library(xlsx)
tablename = read.xlsx("thetable.xlsx",sheetIndex=1,encoding="UTF-8")
datatable(tablename, options = list(pageLength = 5))
But inside the data table, some UTF-8 characters get messed up. I can't figure out why. Whenever I check the strings in R they're correct and everthing in the text is fine too.
The same characters that gets messed up also appear normally in some other lines of the table. Is there a way to force the characters to appear excatly how they appear in R?