dygraphs output has encoding problems with unicode characters in RStudio with encoding options set
I have had a project with working dygraphs in R version 3.4.3 . The generated dygraphs had main title with unicode characters.
Unfortunately after updating to R 3.5.1 and doing the according updates of packages, the unicode characters are not shown correctly anymore. Especially german special characters.
Is there anyone having similar issues?
I reduced this problem to be an issue between dygraphs or htmlwidgets package and the new Version of R Studio 1.1.456 and its viewer.
I solved the issue.
The option
options(encoding = "UTF-8")
in .Rprofile file was introducing the problem of wrong character encoding within my RStudio project.
For reproducing this error you need to prepare an RStudio project and an .Rprofile file with the option included. Then run:
library("datasets")
library("dygraphs")
packageVersion("dygraphs")
packageVersion("HTMLwidgets")
packageVersion("htmltools")
dygraph(ldeaths,main="täst")
In an attempt to make sure that everything is handled in UTF-8 we got a problem which seems to be somewhere between Rstudio an dygraph visualisation.
Anyone who nows what happens there. I reproduced this error also with Rstudio 1.0.153. Might it be a problem with java code or with handing over character strings?