Hi, I think an invalid value of file.encoding should be treated as if it were "ISO-8859-1". Such is the behaviour of Sun's JDK. I added a new mauve test gnu/testlet/java/io/PrintStream/encodings.java.
2005-11-14 Ito Kazumitsu <[EMAIL PROTECTED] * java/io/PrintStream.java(PrintStream (OutputStream, boolean)): Check UnsupportedEncodingException.
Index: classpath/java/io/PrintStream.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/io/PrintStream.java,v retrieving revision 1.25 diff -u -r1.25 PrintStream.java --- classpath/java/io/PrintStream.java 2 Jul 2005 20:32:38 -0000 1.25 +++ classpath/java/io/PrintStream.java 14 Nov 2005 15:39:25 -0000 @@ -113,11 +113,14 @@ try { this.encoding = System.getProperty("file.encoding"); + new String(new byte[]{0}, encoding); // check if encoding is supported } catch (SecurityException e){ this.encoding = "ISO8859_1"; } catch (IllegalArgumentException e){ this.encoding = "ISO8859_1"; } catch (NullPointerException e){ + this.encoding = "ISO8859_1"; + } catch (UnsupportedEncodingException e) { this.encoding = "ISO8859_1"; } this.auto_flush = auto_flush;
_______________________________________________ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches