JDK-6292322 : unexpected exception occurs in InputStreamReader for UTF-16, little endian, and Byte-order-mark
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio.charsets
  • Affected Version: 5.0u4
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2005-06-29
  • Updated: 2017-09-11
  • Resolved: 2006-02-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
1.4.2_12 b01Fixed 6-poolResolved
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
unexpected exception occurs for UTF-16, little endian, and Byte-order-mark stream.

REPRODUCE :
 1) Compiler attached program
 2) Launch "java TEST2 TEST2.xml"

You will see the following message.

C:\users\issues\unicode\TEST2>java -showversion TEST2 TEST2.xml
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode)
sun.io.MalformedInputException: Incorrect byte-order mark
        at sun.io.ByteToCharUnicode.convert(ByteToCharUnicode.java:141)
        at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:2
48)
        at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:298)

        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
        at sun.nio.cs.StreamDecoder.read0(StreamDecoder.java:132)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:118)
        at java.io.InputStreamReader.read(InputStreamReader.java:151)
        at TEST2.main(TEST2.java:22)

CONFIGURATION :
 JRE/JDK : 1.4.2/5.0u4
 OS      : WinXP(SP1, Japanese)
###@###.### 2005-06-29 16:26:48 GMT

Comments
EVALUATION 6230129 ###@###.### 2005-06-29 17:13:06 GMT
29-06-2005