I use RStudio's Presentation feature to create slides.
OS Windows 7
RStudio ver.0.99.491 (latest)
Encoding for Global/Project Option is UTF8.
I have the following problems with choosing a character code.
1. If you select SJIS in the source rpres file, only the folder name will be displayed on the Preview screen.
2. When UTF8 is selected in the source file, the Preview screen is garbled (but when viewed in the browser, the SJIS changes and displays normally).
3.SJIS (CP932) is selected for Encoding Global/Project Option.
If you look at the header properties of the Presentation Preview screen output in inspect, regardless of the Global/Project Option setting, chrset=utf-8 is probably a problem with the Preview display setting, but I don't know how to change this.
I would appreciate it if you could tell me how to deal with it.
This issue occurs only in Japanese Windows (strictly, the OS locale is not UTF-8).
Using Shift-JIS in the source Rpres file is impossible because only UTF-8 is supported for the pandoc for HTML conversion.
If you use UTF-8 in an Rpres file, the fix is reflected in https://github.com/rstudio/rstudio/pull/563, so you can take the latest Rstudio source code from GitHub and build it.
...but that's pretty tough, so for the time being, you can avoid garbled UTF-8 characters by creating some project on Rstudio and creating an Rpres file within the project.
(Strictly speaking, Encoding should be specified as UTF-8 in the project option, but I think it is UTF-8 by default.)
© 2024 OneMinuteCode. All rights reserved.