-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
5.0
-
generic
-
solaris_9
The java.nio.charset.Charset-X-Coder (Encoder, Decoder) API specifications
should be relaxed to no longer put a restriction such as for CharsetEncoder
that newDecoder().charset() ought to return an instnace of the original Charset
object used to create the CharsetEncoder instance (and analogously for
CharsetDecoder, with newEncoder().charset()).
An example case in point where this restriction is inappropriate is for the
case where an implementation provides a Charset which supplies a single decoder
which can handle decoding of more than one encoding scheme. eg, ISO-2022-CN
J2SE decoder will decode *both* ISO-2022-CN-CN or ISO-2022-CN-GB. Whereas for
encoding to either of these separate (but related) encoding schemes is provided
by means of a pair of exclusive Charsets.
It would be better if the specification was relaxed to allow the returned
charset instance provided by the charset() method to provide *either* an
instance of the originating Charset instance *or* an instance of a Charset
whose X-coder instances has the capability of performing roundtrip conversion.
###@###.### 2003-11-06
should be relaxed to no longer put a restriction such as for CharsetEncoder
that newDecoder().charset() ought to return an instnace of the original Charset
object used to create the CharsetEncoder instance (and analogously for
CharsetDecoder, with newEncoder().charset()).
An example case in point where this restriction is inappropriate is for the
case where an implementation provides a Charset which supplies a single decoder
which can handle decoding of more than one encoding scheme. eg, ISO-2022-CN
J2SE decoder will decode *both* ISO-2022-CN-CN or ISO-2022-CN-GB. Whereas for
encoding to either of these separate (but related) encoding schemes is provided
by means of a pair of exclusive Charsets.
It would be better if the specification was relaxed to allow the returned
charset instance provided by the charset() method to provide *either* an
instance of the originating Charset instance *or* an instance of a Charset
whose X-coder instances has the capability of performing roundtrip conversion.
###@###.### 2003-11-06
- relates to
-
JDK-6358684 CharsetDecoder.charset() of x-ISO-2022-CN-CNS x-ISO-2022-CN-GB returns wrong charset
- Resolved
-
JDK-4933523 ISO-2022-CN-CNS has incorrect canonical name (missing x- prefix)
- Closed