How to display non-English (Japanese/Chinese) characters/text in Shiny on Windows? (NOT ABLE TO ENCODE)

Could you create a minimal reproduce example (reprex) that shows the problem? There are a lot of things which can thwart character display, and a reprex would help narrow down the list. The forums have a guide to help make reprexes: FAQ: What's a reproducible example (reprex) and how do I do one?.

It doesn't need to be long. A shiny app with a single output that mishandles certain characters would work. My quick example:


  ui = fluidPage("昨日すき焼きを食べました"),
  server = function(input, output) {}

This displays correctly when I run it. My session info after running that code:

# R version 3.5.1 (2018-07-02)
# Platform: x86_64-w64-mingw32/x64 (64-bit)
# Running under: Windows >= 8 x64 (build 9200)
# Matrix products: default
# locale:
# [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
# [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
# [5] LC_TIME=English_United States.1252    
# attached base packages:
# [1] stats     graphics  grDevices utils     datasets  methods   base     
# other attached packages:
# [1] shiny_1.1.0
# loaded via a namespace (and not attached):
#  [1] compiler_3.5.1  magrittr_1.5    R6_2.2.2        rsconnect_0.8.8 promises_1.0.1 
#  [6] later_0.7.2     htmltools_0.3.6 tools_3.5.1     yaml_2.1.19     Rcpp_0.12.17   
# [11] jsonlite_1.5    digest_0.6.15   xtable_1.8-2    httpuv_1.4.3    mime_0.5
1 Like