sublime-ide-r icon indicating copy to clipboard operation
sublime-ide-r copied to clipboard

rmarkdnown pdf document with special character produces encoding errors using R-IDE build command

Open albertostefanelli opened this issue 7 years ago • 3 comments

The problem appears on with macOS High Sierra 10.13.6 using the last version of R-IDE.
The problem disappears if i use rmarkdown::render(input = "report.Rmd", output_file = "report_native_render.pdf") from the console. Removing the encoding option in the render.py file of R-IDE as suggested by the maintainer of rmarkdown does not resolve the problem.

I attach a rmd and pdfs to reproduce the error.

report.zip

albertostefanelli avatar Oct 18 '18 13:10 albertostefanelli

Could you try saving the file using utf8 encoding?

randy3k avatar Oct 19 '18 14:10 randy3k

Yes, same result.

albertostefanelli avatar Oct 22 '18 14:10 albertostefanelli

I also had problems with encoding on a Mac. I added the following to a setup chunk in the beginning of the file:

suppressWarnings(invisible(Sys.setlocale("LC_ALL", "da_DK.UTF-8")))
# Necessary for Mac OSX because Hermes changes the locale to da_DK.
# Fails silently on windows where there is no problem.

jokorn avatar Nov 25 '19 08:11 jokorn