r - RStudio UTF-8 display issue with htmlwidget:datatable[package DT] -
i have dataframe contained chinese chars encoding utf-8.
for example, dataframe below
testdf <- data.frame(locationname= c("台北","新北市","台南市"), temp=c(30,29,28)) testdf locationname temp 1 台北 30 2 新北市 29 3 台南市 28 library(dt) datatable(testdf)
i found datatable can't display in r viewer (in r console okay) when there have chinese char.
i check index.html generate datatable default using "utf-8"
if manually modify index.html manually to"charset=big5" , using external browser open, okay display. (or choose "show in new windows" , using external browser decode =big5.)
my questions if settings can apply make work in r viewer without manually modify html file manually or view in external browser? help
best regards james
Comments
Post a Comment