简体   繁体   中英

Unexpected INCOMPLETE_STRING when using Korean

I am getting an error saying:

**ERROR: C:\Users\user\Desktop\practice_4/app.R:59:32: unexpected INCOMPLETE_STRING
58:     tabItem(tabName = "signup",
59:             textInput("name",  "
                                   ^**

I was able to run the same code successfully when I was not using shinyDashboard library. From what I've found so far, it looks like a sys.locale() error (someone asked similar question: "unexpected INCOMPLETE_STRING" error when printing Chinese word ).

When I run sessionInfo() I get the following result:

R version 3.1.1 (2014-07-10)
Platform: i386-w64-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=Korean_Korea.949  LC_CTYPE=Korean_Korea.949    LC_MONETARY=Korean_Korea.949
[4] LC_NUMERIC=C                 LC_TIME=Korean_Korea.949    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggplot2_2.1.0        googleVis_0.5.10     xtable_1.8-2         shinyjs_0.6         
[5] shinydashboard_0.5.1 shiny_0.13.2        

loaded via a namespace (and not attached):
 [1] colorspace_1.2-6 digest_0.6.9     DT_0.1           grid_3.1.1       gtable_0.1.2     htmltools_0.3.5 
 [7] htmlwidgets_0.6  httpuv_1.3.3     jsonlite_0.9.19  magrittr_1.5     mime_0.3         miniUI_0.1.1    
[13] munsell_0.4.2    plyr_1.8.3       R6_2.1.2         Rcpp_0.11.5      RJSONIO_1.3-0    scales_0.4.0    
[19] tools_3.1.1      yaml_2.1.13     

I tried setting sys.locale as follows with no success:

Sys.setlocale("LC_TIME", "ko_KR.UTF-8")
Sys.setlocale("LC_CTYPE", "ko_KR.UTF-8")
Sys.setlocale("LC_COLLATE", "ko_KR.UTF-8")
Sys.setlocale("LC_MONETARY", "ko_KR.UTF-8")
Sys.setlocale("LC_MESSAGES", "ko_KR.UTF-8")

Here is my code for ui.R:

body<- dashboardBody(

  actionButton("showSidebar", "Show sidebar"),
  actionButton("hideSidebar", "Hide sidebar"),

  tabItems(
tabItem(tabName = "leaderboard",
        h2="Leaderboard content goes here.",
        dataTableOutput("content")),
tabItem(tabName = "stats",
        h2="stats goes here.",
        fluidRow(
          column(5,
                 hr(),
                 verbatimTextOutput("summa1")),
          column(4,
                 hr(),
                 uiOutput("summa2")),
          column(4,
                 hr(),
                 uiOutput("summa3")))),
tabItem(tabName = "signup",
        textInput("name",  "이름"), # this is where error occurs
        selectInput("college", "대학",choices = list("간호대학", "경영대학",
                                   "공과대학", "농업생명과학대학",
                                   "미술대학", "법과대학",
                                   "사범대학", "사회과학대학",
                                   "수의과대학", "생활과학대학",
                                   "약학대학", "음악대학",
                                   "인문대학", "의과대학",
                                   "자연과학대학", "기타"),
                    selected = 1)))

I use Japanese but during importing of the file I source it with encoding for all imports

source("constants.R",encoding = "UTF-8")

and saved the main file which I am going to run with utf-8 endcoding with the file>save_with_encoding

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM