I, as a MS Word user, appreciate this change tracking function from redoc so very much! However, recently, I encountered troubles when writing articles with redoc in Chinese. I attached a demo file based on a simplified version of Yihui's ctex template in rticle. The file can be compiled by word_document but not redoc.
test.zip
The error message was
processing file: test.preprocessed.Rmd
Quitting from lines 2-19 (test.preprocessed.Rmd)
Error in nchar(input) : invalid multibyte string, element 1
Calls: <Anonymous> ... process_group.inline -> call_inline -> in_dir -> inline_exec
In addition: Warning messages:
1: In readChar(x, file.info(x)$size) :
can only read in bytes in a non-UTF-8 MBCS locale
2: In knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet, :
The file "test.preprocessed.Rmd" must be encoded in UTF-8. Please see https://yihui.name/en/2018/11/biggest-regret-knitr/ for more info.
Execution halted
I'm using MS Word 2019 and here's the session info and, yes, I already set the default encoding as UTF-8 and tried to switch Sys.setlocale() to Chinese and English. Nothing helps.
I, as a MS Word user, appreciate this change tracking function from
redoc
so very much! However, recently, I encountered troubles when writing articles withredoc
in Chinese. I attached a demo file based on a simplified version of Yihui's ctex template inrticle
. The file can be compiled byword_document
but notredoc
. test.zipThe error message was
I'm using MS Word 2019 and here's the session info and, yes, I already set the default encoding as UTF-8 and tried to switch
Sys.setlocale()
to Chinese and English. Nothing helps.