United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4413998 : RFE: java should allow users to modify JVM's default character set

Details
Type:
Enhancement
Submit Date:
2001-02-09
Status:
Closed
Updated Date:
2003-03-24
Project Name:
JDK
Resolved Date:
2003-03-24
Component:
core-libs
OS:
generic
Sub-Component:
java.nio.charsets
CPU:
generic
Priority:
P4
Resolution:
Duplicate
Affected Versions:
1.3.0
Fixed Versions:

Related Reports
Duplicate:

Sub Tasks

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



Hardware and Software, Engineered to Work Together