Setting the default Java character encoding

后端 未结 17 2061
终归单人心
终归单人心 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:54

    Recently I bumped into a local company's Notes 6.5 system and found out the webmail would show unidentifiable characters on a non-Zhongwen localed Windows installation. Have dug for several weeks online, figured it out just few minutes ago:

    In Java properties, add the following string to Runtime Parameters

    -Dfile.encoding=MS950 -Duser.language=zh -Duser.country=TW -Dsun.jnu.encoding=MS950
    

    UTF-8 setting would not work in this case.

提交回复
热议问题