When I take, for example, a string of Japanese text and try to write
it out into an OutputStreamWriter that is using an encoding which does
not support those characters -- e.g. Big5 or US-ASCII -- many characters
can't be converted.
The bug is that the error is silent, and the write claims to succeed
when in fact it failed -- yet the output does not contain the characters
which I wrote !! (It substitutes a "?" silently.)
This prevents writing general transcoding software, to do full
character set conversion, in Java. Only character encodings such
as "UTF-8" or "UTF-16" can be fully supported for transcoding.
Applications which need to automatically transcode can't support
such functionality.
it out into an OutputStreamWriter that is using an encoding which does
not support those characters -- e.g. Big5 or US-ASCII -- many characters
can't be converted.
The bug is that the error is silent, and the write claims to succeed
when in fact it failed -- yet the output does not contain the characters
which I wrote !! (It substitutes a "?" silently.)
This prevents writing general transcoding software, to do full
character set conversion, in Java. Only character encodings such
as "UTF-8" or "UTF-16" can be fully supported for transcoding.
Applications which need to automatically transcode can't support
such functionality.
- relates to
-
JDK-4155601 (spec) OutputStreamWriter clas javadoc should say what happens to unsupported characters
-
- Resolved
-