I am running a shiny app with many Hebrew characters
I have no problem seeing the hebrew or downloading Hebrew characters in an excel file or as part of a png file
the problam is that my file names are gibberish :
This is my code:
output$downloadhist <-
downloadHandler(
filename = function() { paste(input$chosenfile,input$chosenSituation, '.png', sep="_")},
content = function(file) {
png(file,width = 700,
height = 400,
units = "px",)
print(his())
dev.off()
}
)
Encoding()
to the string given to filename
gives: UTF-8
I tried to iconv
the string to windows-1255
did nothing, tried to iconv
to UTF-16
and got an error:Embedded nul in string
How can i make sure that windows can recognize the file name encoding?
my sessioninfo()
gives:
R version 3.1.2 (2014-10-31) Platform: x86_64-w64-mingw32/x64 (64-bit)
locale: 1 LC_COLLATE=Hebrew_Israel.1255 LC_CTYPE=Hebrew_Israel.1255 [3] LC_MONETARY=Hebrew_Israel.1255 LC_NUMERIC=C [5] LC_TIME=Hebrew_Israel.1255
attached base packages: 1 stats graphics grDevices utils
datasets methods base
other attached packages: 1 zoo_1.7-12 openxlsx_3.0.0
reshape2_1.4.1 leaflet_1.0.1.9000 [5] ggmap_2.4
plyr_1.8.3 ggplot2_1.0.1 lubridate_1.3.3 [9] htmlwidgets_0.5 scales_0.3.0 shiny_0.12.2
loaded via a namespace (and not attached): 1 colorspace_1.2-6
digest_0.6.8 geosphere_1.3-13 grid_3.1.2 [5] gtable_0.1.2 htmltools_0.2.6 httpuv_1.3.3 jpeg_0.1-8 [9] jsonlite_0.9.17 labeling_0.3 lattice_0.20-29
magrittr_1.5 [13] mapproj_1.2-2 maps_2.3-9
MASS_7.3-35 memoise_0.2.1 [17] mime_0.4
munsell_0.4.2 png_0.1-7 proto_0.3-10 [21] R6_2.1.1 Rcpp_0.12.1 RgoogleMaps_1.2.0.7 rjson_0.2.15 [25] RJSONIO_1.3-0 rstudio_0.98.1102
rstudioapi_0.3.1 sp_1.2-0 [29] stringi_0.5-5
stringr_1.0.0 tools_3.1.2 xtable_1.7-4