Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6292322

unexpected exception occurs in InputStreamReader for UTF-16, little endian, and Byte-order-mark

XMLWordPrintable

        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

              npatelsunw Nishant Patel (Inactive)
              tbaba Tadayuki Baba (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: