From: Bryce McKinlay Date: Tue, 22 Jun 2004 19:24:32 +0000 (+0000) Subject: BytesToUnicode.java (getDecoder): Pass original encoding name to iconv. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eb8163abfbde8250b9b7450860f06f65356993ca;p=gcc.git BytesToUnicode.java (getDecoder): Pass original encoding name to iconv. * gnu/gcj/convert/BytesToUnicode.java (getDecoder): Pass original encoding name to iconv. * gnu/gcj/convert/UnicodeToBytes.java (getEncoder): Likewise. From-SVN: r83512 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index d61b10c4adb..a0a8fda37cc 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2004-06-22 Bryce McKinlay + + * gnu/gcj/convert/BytesToUnicode.java (getDecoder): Pass original + encoding name to iconv. + * gnu/gcj/convert/UnicodeToBytes.java (getEncoder): Likewise. + 2004-06-22 Bryce McKinlay PR libgcj/16134: diff --git a/libjava/gnu/gcj/convert/BytesToUnicode.java b/libjava/gnu/gcj/convert/BytesToUnicode.java index 6dc5bfd569d..f33720aa227 100644 --- a/libjava/gnu/gcj/convert/BytesToUnicode.java +++ b/libjava/gnu/gcj/convert/BytesToUnicode.java @@ -75,14 +75,14 @@ public abstract class BytesToUnicode extends IOConverter { /* First hunt in our cache to see if we have a decoder that is already allocated. */ - encoding = canonicalize(encoding); + String canonicalEncoding = canonicalize(encoding); synchronized (BytesToUnicode.class) { int i; for (i = 0; i < decoderCache.length; ++i) { if (decoderCache[i] != null - && encoding.equals(decoderCache[i].getName ())) + && canonicalEncoding.equals(decoderCache[i].getName ())) { BytesToUnicode rv = decoderCache[i]; decoderCache[i] = null; @@ -92,7 +92,7 @@ public abstract class BytesToUnicode extends IOConverter } // It's not in the cache, so now we have to do real work. - String className = "gnu.gcj.convert.Input_" + encoding; + String className = "gnu.gcj.convert.Input_" + canonicalEncoding; Class decodingClass; try { diff --git a/libjava/gnu/gcj/convert/UnicodeToBytes.java b/libjava/gnu/gcj/convert/UnicodeToBytes.java index 74600ec12c0..b1432586ce5 100644 --- a/libjava/gnu/gcj/convert/UnicodeToBytes.java +++ b/libjava/gnu/gcj/convert/UnicodeToBytes.java @@ -73,14 +73,14 @@ public abstract class UnicodeToBytes extends IOConverter { /* First hunt in our cache to see if we have a encoder that is already allocated. */ - encoding = canonicalize(encoding); + String canonicalEncoding = canonicalize(encoding); synchronized (UnicodeToBytes.class) { int i; for (i = 0; i < encoderCache.length; ++i) { if (encoderCache[i] != null - && encoding.equals(encoderCache[i].getName ())) + && canonicalEncoding.equals(encoderCache[i].getName ())) { UnicodeToBytes rv = encoderCache[i]; encoderCache[i] = null; @@ -89,7 +89,7 @@ public abstract class UnicodeToBytes extends IOConverter } } - String className = "gnu.gcj.convert.Output_" + encoding; + String className = "gnu.gcj.convert.Output_" + canonicalEncoding; Class encodingClass; try {