-3

I have tried a lot of approaches but no success

e.g. I tried setting

file.encoding=utf-8,
System.getProperty("file.encoding","UTF-8") , 
spring.banner.charset=utf-8 , 
info.app.encoding=UTF-8 , 
spring.info.git.encoding=UTF-8 , 
spring.messages.encoding=UTF-8
Shailesh Chandra
  • 2,164
  • 2
  • 17
  • 25

1 Answers1

1

Java properties files are in ISO-8859-1. You can only read them with another character set using Properties.load(Reader reader) instead of Properties.load(InputStream inStream). However, as most tools (and I think Spring does to), use Properties.load(InputStream inStream) you have no choice but to stick to ISO-8859-1.

If you want to use characters outside of ISO-8859-1 in a properties file, you need to use unicode escapes.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197