Setting the default Java character encoding

后端 未结 17 1718
终归单人心
终归单人心 2020-11-21 06:09

How do I properly set the default character encoding used by the JVM (1.5.x) programmatically?

I have read that -Dfile.encoding=whatever used to be the

17条回答
  •  无人共我
    2020-11-21 07:02

    I'm using Amazon (AWS) Elastic Beanstalk and successfully changed it to UTF-8.

    In Elastic Beanstalk, go to Configuration > Software, "Environment properties". Add (name) JAVA_TOOL_OPTIONS with (value) -Dfile.encoding=UTF8

    After saving, the environment will restart with the UTF-8 encoding.

提交回复
热议问题