rstudio / markdown

The first generation of Markdown rendering for R (born in 2012), based on commonmark. Note that this package is markdown, not *rmarkdown*.
https://cran.r-project.org/package=markdown
Other
85 stars 78 forks source link

problem with chinese encoding using markdownToHTML #82

Closed earthcli closed 5 years ago

earthcli commented 7 years ago

I have create a shiny app with a html genereated by a Rmd file, using code as below: but it does not work when there exist chinese word, I have tried to generated a utf-8 format Rmd, but it still does not work. while it works with html=HTML(readLines(rmarkdown::render(Rmdfile),encoding="UTF-8")), but the dashboard sidebarmenu does not friend with includeHTML, so I have to use includeMarkdwon, can you help me? html=HTML(markdown::markdownToHTML(knit(Rmdfile,quiet=TRUE),extensions=setdiff(markdownExtensions(),'no_intra_emphasis'),options=c("hard_wrap","use_xhml","smartypants")[3]))