bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/22882] wrong names returned java.io.InputStreamReader.get


From: gcc-bugzilla at gcc dot gnu dot org
Subject: [Bug classpath/22882] wrong names returned java.io.InputStreamReader.getEncoding() when using NIO charsets
Date: 16 Oct 2005 01:27:34 -0000

Due to a quick fix a problem was introduced that causes
java.io.InputStreamReader.getEncoding() to not return the right encoding name
(according to http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html)
when the InputStreamReader instance was created using the
(InputStream, Charset) or (InputStream, CharsetDecoder) constructors.

If corrected the output for e.g. ISO-8859_1 would be the following:

cs2 = Charset.forName("latin1");
isr = new InputStreamReader(someInputStreamInstance, cs2);
print(isr.getEncoding());
ISO8859_1

print(cs2.name());
ISO-8859-1

currently isr.getEncoding().equals(cs2.name()) holds which is not right
according to the specification given in the URL.


------- Comment #1 from from-classpath at savannah dot gnu dot org  2005-04-13 
12:41 -------
Fixed in my io-to-nio patch, InputStreamReader and OutputStreamReader now map
NIO canonical names to IO canonical names, if one is available.


------- Comment #2 from from-classpath at savannah dot gnu dot org  2005-06-17 
01:50 -------
Mauve tests provided. Closing this.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22882





reply via email to

[Prev in Thread] Current Thread [Next in Thread]