I have written my first .Rpres presentation file in Chinese. It was working for fine for the first few hours. then all of sudden, the preview started showing junk characters. I found out the .md file that was created by .Rpres was enocded in utf-8, but the contents was not in UTF-8. so during the process of converting .Rpres to .md, utf-8 encoding was not use. My presentation file is in the proejct, and project setting is already UTF-8. the system locale and language are all set to Chinese UTF-8 correctly.
> sessionInfo() R version 4.1.2 (2021-11-01) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19043) Matrix products: default locale:  LC_COLLATE=Chinese (Simplified)_China.936 LC_CTYPE=Chinese (Simplified)_China.936 LC_MONETARY=Chinese (Simplified)_China.936  LC_NUMERIC=C LC_TIME=Chinese (Simplified)_China.936 system code page: 65001 attached base packages:  stats graphics grDevices utils datasets methods base other attached packages:  RMySQL_0.10.23 DBI_1.1.2 loaded via a namespace (and not attached):  Rcpp_1.0.8 lattice_0.20-45 here_1.0.1 png_0.1-7 digest_0.6.29 rprojroot_2.0.2 rappdirs_0.3.3 grid_4.1.2  jsonlite_1.7.2 magrittr_2.0.1 evaluate_0.14 rlang_0.4.12 DT_0.20 Matrix_1.3-4 reticulate_1.23 rmarkdown_2.11  tools_4.1.2 htmlwidgets_1.5.4 rsconnect_0.8.25 xfun_0.29 fastmap_1.1.0 compiler_4.1.2 htmltools_0.5.2 knitr_1.37
> system('locale') LANG=zh_CN.UTF-8 LC_CTYPE="zh_CN.UTF-8" LC_NUMERIC="zh_CN.UTF-8" LC_TIME="zh_CN.UTF-8" LC_COLLATE="zh_CN.UTF-8" LC_MONETARY="zh_CN.UTF-8" LC_MESSAGES="zh_CN.UTF-8" LC_ALL=