JDK-4413998 : RFE: java should allow users to modify JVM's default character set
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.nio.charsets
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2001-02-09
  • Updated: 2003-03-24
  • Resolved: 2003-03-24
Related Reports
Duplicate :  
Description
Name: yyT116575			Date: 02/09/2001


java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-RC)
Java HotSpot(TM) Client VM (build 1.3.0-RC, mixed mode)

I tried to modify the JVM's default character set in application level. I mean
that I hate to use command argument -Dfile.encoding=ISO-8859-1 to modify JVM's
default character set. However, I could not do it at all.

It seems that JVM will never pick up new system properties after JVM is
started. The source code of java.lang.System tells me that system properties
are no more than simple variables. Thus, using System.setProperty
( "file.encoding", "ISO-8859-1" ) does not affect the JVM at all.

It seems that jvm.dll is the one who load the default character set. Is there
any way to modify jvm.dll?

Any other solution to modify JVM's default character set? (not command line
argument).
(Review ID: 116625) 
======================================================================

Comments
EVALUATION This is not a bug, see the previously supplied explanation in 4163515. The preferred and supported way of changing the file encoding is to change the locale before launching the VM. The file.encoding property contrary to some incorrect assumptions is not a writeable system property. Some clarification of this in addition to some future work to prohibit any side-effects of supplying a -Dfile.encoding specifier in the invokation of runtime tools,etc is also covered in 4165411 ###@###.### 2002-03-21
2002-03-21