Package inputenc Error: Unicode char \u8 in RStudio

后端 未结 5 953
死守一世寂寞
死守一世寂寞 2020-12-28 16:34

In RStudio, when i go for convert my Markdown file to PDF then it gives me the error:

output file: report.knit.md

! Package inputenc Error

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-28 16:53

    I had the same problem, but with a very long document. Rather than manually split the document to find the offending non-utf8 text, I found this solution (for users of RStudio), saving the document in the utf8 format, worked a treat and saved lots of time:

    • in Rstudio
    • from the menu choose "File" > "Save with encoding..."
    • from the dialog box choose "UTF-8"

    Here are the original links:

    • https://shiny.rstudio.com/articles/unicode.html
    • https://github.com/rstudio/rmarkdown/issues/339

提交回复
热议问题