Display Hindi Text for ggraph on ubuntu EC2 server

Hi all,

I have a question regarding a network plot with ggraph. I built a shiny application that pulls in tweets and then plots a network graph with the text that was pulled. On my local machine, everything works perfectly, however, on my EC2 ubuntu server, the Hindi language is not displayed. Does anyone have any idea what I have to do to or can point me to resources on how I can fix this issue on the server?

The pictures is from my local app where everything is displayed perfectly. You can also go to https://shiny.pascal-schmidt-ds.com/keywords/ to see the app and see that Hindi is not displayed for the wordcloud and the ggraph. Also, please let me know if you need me to provide you with some code.

Thank you.


Welcome to the RStudio community!

This sounds like a file encoding / display issue. The fact that it works locally is probably because some background settings are different. If the input files are not in the correct encoding format, then some may only display on certain machines.

I found an article that might help you here. To check what your default encoding on your machine is, run localeToCharset(). ShinyApps usually runs with UTF-8 so if the format is not correct, it might read it incorrectly. You can always read data with specifying the encoding explicitly, or save it in UTF-8 so it'll default to the correct one.

Finally, you can change the R environment by using the locales as described here.

Hope this helps,


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.