--- /home/cpdev/src/classpath/java/nio/charset/Charset.java	2005-07-02 21:03:37.000000000 +0000
+++ java/nio/charset/Charset.java	2005-06-30 05:34:43.000000000 +0000
@@ -38,10 +38,7 @@
 
 package java.nio.charset;
 
-import gnu.classpath.SystemProperties;
-
 import gnu.java.nio.charset.Provider;
-import gnu.java.nio.charset.iconv.IconvProvider;
 
 import java.io.BufferedReader;
 import java.io.InputStreamReader;
@@ -62,7 +59,6 @@
 /**
  * @author Jesse Rosenstock
  * @since 1.4
- * @status updated to 1.5
  */
 public abstract class Charset implements Comparable
 {
@@ -120,51 +116,6 @@
       }
   }
 
-  /**
-   * Returns the system default charset.
-   *
-   * This may be set by the user or VM with the file.encoding
-   * property.
-   */
-  public static Charset defaultCharset()
-  {
-    String encoding;
-    
-    try 
-      {
-	encoding = SystemProperties.getProperty("file.encoding");
-      }
-    catch(SecurityException e)
-      {
-	// Use fallback.
-	encoding = "ISO-8859-1";
-      }
-    catch(IllegalArgumentException e)
-      {
-	// Use fallback.
-	encoding = "ISO-8859-1";
-      }
-
-    try
-      {
-	return forName(encoding);
-      }
-    catch(UnsupportedCharsetException e)
-      {
-	// Ignore.
-      }
-    catch(IllegalCharsetNameException e)
-      {
-	// Ignore.
-      }
-    catch(IllegalArgumentException e)
-      {
-	// Ignore.
-      }
-    
-    throw new IllegalStateException("Can't get default charset!");
-  }
-
   public static boolean isSupported (String charsetName)
   {
     return charsetForName (charsetName) != null;
@@ -234,12 +185,21 @@
 
   private static CharsetProvider provider()
   {
-    String useIconv = SystemProperties.getProperty
-      ("gnu.classpath.nio.charset.provider.iconv");
-
-    if (useIconv != null)
-      return IconvProvider.provider();
-
+    try
+      {
+	String s = System.getProperty("charset.provider");
+	if (s != null)
+	  {
+	    CharsetProvider p =
+	      (CharsetProvider) ((Class.forName(s)).newInstance());
+	    return p;
+	  }
+      }
+    catch (Exception e)
+      {
+	// Ignore.
+      }
+    
     return Provider.provider();
   }
 
