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

ByteToCharSJIS.convert throws ArrayIndexOutOfBoundsException

XMLWordPrintable

    • generic, x86
    • solaris_9, windows_95


      takeshi.asano@Japan 1997-01-27

      ByteToCharSJIS.convert throws ArrayIndexOutOfBoundsException
      in converting SJIS text > 8192 bytes.
      This problem looks same as or similar to 4026251 for EUCJIS.
      If ByteToCharSJIS.convert has already been fixed in 1.1fcs, it's good.
      Otherwise, please fix.

      To reproduce, please extract attached files:
      InOut.java
      kanji.sjis.8142
      kanji.sjis.8201
      and compile InOut.java.

      asano@furikake[1852]$ java InOut SJIS < kanji.sjis.8201 > /dev/null
      java.lang.ArrayIndexOutOfBoundsException: -37
         at sun.io.ByteToCharSJIS.convert(ByteToCharSJIS.java:165)
         at java.io.InputStreamReader.convertInto(InputStreamReader.java)
         at java.io.InputStreamReader.fill(InputStreamReader.java)
         at java.io.InputStreamReader.read(InputStreamReader.java)
         at java.io.InputStreamReader.read(InputStreamReader.java)
         at InOut.main(InOut.java:56)
      asano@furikake[1853]$ java InOut SJIS < kanji.sjis.8142 > /dev/null
      asano@furikake[1854]$

            nishimur Naoyuki Ishimura (Inactive)
            taasano Takeshi Asano (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: