+2004-06-22 Bryce McKinlay <mckinlay@redhat.com>
+
+ * gnu/gcj/convert/BytesToUnicode.java (getDecoder): Pass original
+ encoding name to iconv.
+ * gnu/gcj/convert/UnicodeToBytes.java (getEncoder): Likewise.
+
2004-06-22 Bryce McKinlay <mckinlay@redhat.com>
PR libgcj/16134:
{
/* 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;
}
// 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
{
{
/* 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;
}
}
- String className = "gnu.gcj.convert.Output_" + encoding;
+ String className = "gnu.gcj.convert.Output_" + canonicalEncoding;
Class encodingClass;
try
{