Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29539

How to configure EC2 to process emoji in my spring boot app

$
0
0

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.

Telegram screenshot

What I have tried so far:

  1. Run java with arguments:
java -Dfile.encoding=UTF-8 -Duser.language=en -Duser.country=US -jar
  1. Set locale in application.properties
spring.mandatory-file-encoding=UTF-8

spring.http.encoding.charset=UTF-8

spring.http.encoding.enabled=true
  1. 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!


Viewing all articles
Browse latest Browse all 29539

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>