I want my Spring Boot application to use default charset CP866
. So, during Tomcat startup, I added the following in Environment variable:
JAVA_TOOL_OPTIONS=-Dfile.encoding=CP866
Still, it seems the change is not in effect, the application is not using CP866
as the default charset.
Also, when I see Java properties using java -XshowSettings
, it still shows: file.encoding = UTF-8
Please share if you have any idea how to achieve the change?
Note: after migrating from a new server, in my app, an image/photo update feature is not working properly. I sense this is because of encoding issue on the new system. In the previous server, the file.encoding was CP866
.
I don't prefer any code change for the new server.
Thanks in advance.