Code works in R Studio but throws utf-8 error message in Shiny

shiny

#1

I am running the following code. It works fine in R Studio but fails in Shiny. Code is:

 medcomp_survey_audit_am$missing <- lapply(medcomp_survey_audit_am$responses,  
                                              function(s) medcomp_dlist_am[!medcomp_dlist_am %in% s])

error message that is returned is:

Called from: eval(expr, envir, enclos)
Error in gregexpr(calltext, singleline, fixed = TRUE) : 
  regular expression is invalid UTF-8
Browse[1]> n
debug at C:\activity_ex\health_monitoring/server.R#338: medcomp_survey_audit_am$missing <- lapply(medcomp_survey_audit_am$responses, 
    function(s) medcomp_dlist_am[!medcomp_dlist_am %in% s])
Browse[2]> n

#2

I'm guessing you are having a similar issue to what I did (mismatch between the character encoding environments). Did you ever find a solution? I've been scrolling around, but can't figure this out.