I am having an issue where my wordcloud::wordcloud()
renders properly with Chinese characters encoded in UTF-8 when I run my Shiny app locally (Windows 10 machine), but when I deploy it to shinyapps.io
the wordcloud no longer renders properly.
This is the code where I make the wordcloud in my server.R
:
wordcloud_rep <- repeatable(wordcloud)
output$wordcloud <- renderPlot({
wordcloud_rep(word_tab()$word, word_tab()$freq,
min.freq = wordcloud_minfreq(),
max.words = wordcloud_maxwords(),
random.order = FALSE,
colors = brewer.pal(8, "Dark2"))
})
}
However, other Chinese characters in my app deployed on shinyapps.io
show up correctly, as shown here.
I tried setting options(encoding = "UTF-8")
as some people do here, but it does not seem to resolve the issue.