I'm currently trying to run a Telegram bot on EC2 instance.
But the problem is - all non-english symbol are replaced. On the screenshot you can see how emojis are replaces (e.g. before 'Settings' word) Or how russian word is totally messed.
What I have tried so far:
- Run java with arguments:
java -Dfile.encoding=UTF-8 -Duser.language=en -Duser.country=US -jar
- Set locale in application.properties
spring.mandatory-file-encoding=UTF-8 spring.http.encoding.charset=UTF-8 spring.http.encoding.enabled=true
- Set /etc/environment locale
JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk" LANG=en_US.utf-8 LC_ALL=en_US.utf-8
Please note: My messages / button text values are stored in appropriate locale bundles in app resources. And considering that bot still works (he recognizes the value of message he receives even if its messed) I assume that it has something to do with java app.
P.S. When I run it locally - it works perfectly.
Any help will be highly appreciated!