0

I'm trying to use checkboxGroupInput in my shiny app with accents like this:

column(3,
  checkboxGroupInput("plotType", "Selecciona el estilo de la gráfica",
                     c("Líneas"="line", "Puntos"= "point"), "line")
                     )

But when I run the app the title of the checkbox is fine (where accents are present) but in the options it prints out:

Selecciona el estilo de la gráfica:

[ ] L < U + 0 0 E D > neas

[ ] Puntos

What can I do to print the accent in "Líneas" correctly???

natorro
  • 2,793
  • 3
  • 19
  • 16
  • Works fine for me, but R's handling of accents is somewhat locale dependent. In the context of Shiny, I suspect that means the server's locale. – alistaire Jun 27 '16 at 22:25
  • What locale should I be using? can I change that inside the R Script? – natorro Jun 27 '16 at 22:41
  • It depends on your OS, but UTF-8 works for me on OS X. You can set it from inside R with `Sys.setlocale` (or just `system` with the appropriate terminal command). Some googling is probably in order first, though; everything (not just R) uses your locale when deciding how to encode files. – alistaire Jun 27 '16 at 22:51
  • 1
    Amazing! thank you very much, I just added this line: Sys.setlocale("LC_ALL", 'en_US.UTF-8') this just came from http://stackoverflow.com/questions/20577764/set-locale-to-system-default-utf-8 – natorro Jun 28 '16 at 05:26

0 Answers0