Setting the default Java character encoding

后端 未结 17 2052
终归单人心
终归单人心 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 06:50

    Following @Caspar comment on accepted answer, the preferred way to fix this according to Sun is :

    "change the locale of the underlying platform before starting your Java program."

    http://bugs.java.com/view_bug.do?bug_id=4163515

    For docker see:

    http://jaredmarkell.com/docker-and-locales/

提交回复
热议问题