]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* java/util/Properties.java: Re-merged from Classpath.
authorTom Tromey <tromey@redhat.com>
Thu, 6 Sep 2001 17:16:09 +0000 (17:16 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Thu, 6 Sep 2001 17:16:09 +0000 (17:16 +0000)
From-SVN: r45442

libjava/ChangeLog
libjava/java/util/Properties.java

index fb2d75d58422067704447e79e93712809a465df8..58e65ea5957b0e9b4b885b742497c676c90e8fd4 100644 (file)
@@ -1,5 +1,7 @@
 2001-09-05  Tom Tromey  <tromey@redhat.com>
 
+       * java/util/Properties.java: Re-merged from Classpath.
+
        From Eric Blake, via Classpath:
        * java/lang/String.java (CaseInsensitiveComparator): New class.
        (CASE_INSENSITIVE_ORDER): Use instance of CaseInsensitiveComparator.
index dc679faf126aad768dca7118b9bc80d0074440a1..5812173c91ff4bcb15273854248b573be2a430e0 100644 (file)
@@ -1,5 +1,5 @@
 /* java.util.Properties
-   Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -61,7 +61,8 @@ import java.io.*;
  * of <code>get/put</code>.
  *
  * @see PropertyResourceBundle
- * @author Jochen Hoenicke */
+ * @author Jochen Hoenicke
+ */
 public class Properties extends Hashtable
 {
   /**
@@ -128,8 +129,9 @@ public class Properties extends Hashtable
    * from the input.  */
   public void load(InputStream inStream) throws IOException
   {
+    // The spec says that the file must be encoded using ISO-8859-1.
     BufferedReader reader =
-      new BufferedReader(new InputStreamReader(inStream));
+      new BufferedReader(new InputStreamReader(inStream, "ISO-8859-1"));
     String line;
     
     while ((line = reader.readLine()) != null)
@@ -302,7 +304,9 @@ public class Properties extends Hashtable
    */
   public void store(OutputStream out, String header) throws IOException
   {
-    PrintWriter writer = new PrintWriter(out);
+    // The spec says that the file must be encoded using ISO-8859-1.
+    PrintWriter writer
+      = new PrintWriter(new OutputStreamWriter (out, "ISO-8859-1"));
     if (header != null)
       writer.println("#" + header);
     writer.println("#" + new Date().toString());