REditorSupport / sublime-ide-r

R-IDE: Make Sublime Text a perfect IDE for R
MIT License
112 stars 7 forks source link

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

Open albertostefanelli opened 5 years ago

albertostefanelli commented 5 years ago

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

randy3k commented 5 years ago

Could you try saving the file using utf8 encoding?

albertostefanelli commented 5 years ago

Yes, same result.

jokorn commented 4 years ago

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.