diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 785c9bbae63..331f7d00e37 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,10 @@ +2003-02-15 Jesse Rosenstock + + * java/nio/charset/Charset.java + (isRegistered): Fixed method args and implementation. + * java/nio/charset/CharsetEncoder.java + (unmappableCharacterAction): New method. + 2003-02-15 Michael Koch * java/awt/CheckboxMenuItem.java diff --git a/libjava/java/nio/charset/Charset.java b/libjava/java/nio/charset/Charset.java index cc60c99b9b6..889267f302f 100644 --- a/libjava/java/nio/charset/Charset.java +++ b/libjava/java/nio/charset/Charset.java @@ -187,9 +187,10 @@ public abstract class Charset implements Comparable return canonicalName; } - public final boolean isRegistered (String name) + public final boolean isRegistered () { - return !name.startsWith ("x-") && !name.startsWith ("X-"); + return (!canonicalName.startsWith ("x-") + && !canonicalName.startsWith ("X-")); } public abstract boolean contains (Charset cs); diff --git a/libjava/java/nio/charset/CharsetEncoder.java b/libjava/java/nio/charset/CharsetEncoder.java index dd434a79752..dc1fa99cd93 100644 --- a/libjava/java/nio/charset/CharsetEncoder.java +++ b/libjava/java/nio/charset/CharsetEncoder.java @@ -319,6 +319,11 @@ public abstract class CharsetEncoder return this; } + public CodingErrorAction unmappableCharacterAction () + { + return unmappableCharacterAction; + } + public final CharsetEncoder onUnmappableCharacter (CodingErrorAction newAction) {