簡體   English   中英

得到??? 在閃亮的 R 中渲染 HTML 時使用符號而不是特殊字符

[英]Getting ??? symbols instead of special characters when rendering HTML in shiny R

當我在瀏覽器中打開我的 html 文件時,一切都很好,但是當我運行閃亮的應用程序時,我得到了一個 ? 某些字符應該在哪里的符號。 例如 ' 符號在我的索引頁面中返回:app?s

我想要的:應用程序

library(shiny)

ui <- fluidPage(
  uiOutput("html")
)

server <- function(input, output, session) {
  output$html <- renderUI({
    tags$iframe(style = "height:800px; width:100%; scrolling=yes", src = "www/index.html")
  })
}

shinyApp(ui, server)

我發現了我的錯誤。 html 文件最初是從 word 文檔轉換而來的,編碼與 R 不兼容 UTF-8。我只是將編碼更改為 UTF-8,一切正常!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM