summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--java/lang/System.java4
-rw-r--r--vm/reference/java/lang/VMRuntime.java1
3 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 56693aef8..bf580d2d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-07-08 Mark Wielaard <mark@klomp.org>
+
+ * java/lang/System.java (static): Set file.encoding to 8859_1 when
+ not set yet.
+ * vm/reference/java/lang/VMRuntime.java (insertSystemProperties):
+ Document file.encoding property.
+
2004-07-08 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/io/File.java
diff --git a/java/lang/System.java b/java/lang/System.java
index 5fdaf55b4..94ddb90a0 100644
--- a/java/lang/System.java
+++ b/java/lang/System.java
@@ -209,6 +209,10 @@ public final class System
defaultProperties.put("gnu.java.io.encoding_scheme_alias.us-ascii",
"8859_1");
+ // 8859_1 is a safe default encoding to use when not explicitly set
+ if (defaultProperties.get("file.encoding") == null)
+ defaultProperties.put("file.encoding", "8859_1");
+
// XXX FIXME - Temp hack for old systems that set the wrong property
if (defaultProperties.get("java.io.tmpdir") == null)
defaultProperties.put("java.io.tmpdir",
diff --git a/vm/reference/java/lang/VMRuntime.java b/vm/reference/java/lang/VMRuntime.java
index ce45a0c2a..4891200de 100644
--- a/vm/reference/java/lang/VMRuntime.java
+++ b/vm/reference/java/lang/VMRuntime.java
@@ -216,6 +216,7 @@ final class VMRuntime
* <dt>os.arch <dd>Operating System Architecture
* <dt>os.version <dd>Operating System Version
* <dt>file.separator <dd>File separator ("/" on Unix)
+ * <dt>file.encoding <dd>Standard encoding for text (Default 8859_1)
* <dt>path.separator <dd>Path separator (":" on Unix)
* <dt>line.separator <dd>Line separator ("\n" on Unix)
* <dt>user.name <dd>User account name