[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: Default file.encoding
From: |
Mark Wielaard |
Subject: |
FYI: Default file.encoding |
Date: |
Thu, 08 Jul 2004 16:11:23 +0200 |
Hi,
A while ago the OVM hackers complained that the file.encoding system
property was mentioned in the hacking guide and used in a couple of
places in our library but not explicitly set or documented whether the
runtime was responsible for setting it. This patch fixes that.
2004-07-08 Mark Wielaard <address@hidden>
* 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.
Cheers,
Mark
Index: java/lang/System.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/lang/System.java,v
retrieving revision 1.36
diff -u -r1.36 System.java
--- java/lang/System.java 4 Jul 2004 16:50:52 -0000 1.36
+++ java/lang/System.java 8 Jul 2004 14:05:08 -0000
@@ -209,6 +209,10 @@
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",
Index: vm/reference/java/lang/VMRuntime.java
===================================================================
RCS file: /cvsroot/classpath/classpath/vm/reference/java/lang/VMRuntime.java,v
retrieving revision 1.4
diff -u -r1.4 VMRuntime.java
--- vm/reference/java/lang/VMRuntime.java 27 Apr 2004 22:56:05 -0000
1.4
+++ vm/reference/java/lang/VMRuntime.java 8 Jul 2004 14:05:08 -0000
@@ -216,6 +216,7 @@
* <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
signature.asc
Description: This is a digitally signed message part
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: Default file.encoding,
Mark Wielaard <=