When I open my html file in a browser everything renders fine but when I run the shiny app I am getting a ? symbol where certain characters should be. For example the ' symbol returns this in my index page: app?s
What I want: 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)
I figured out my mistake. The html file had originally been converted from a word document and the encoding was not UTF-8 compatible with R. I simply changed the encoding to UTF-8 and everything works!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.