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

exception thrown from InputStreamReader - koi8-r charset

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.1_beta, 1.1.4
    • core-libs
    • None
    • other, sparc
    • other, solaris_2.5.1

      This is probably the wrong subcategory for this bug but I couldn't find
      anything related to I18N/converters...


      Build & run the attached testcase (sampR, its an application). You need to pass
      in a charset on the command line, and it needs the associated data file (inp) to
      be in the current directory. I'm currently using jdk1.1.4.

      Try "sampR iso-8859-1", "sampR iso-2022-jp", or "sampR EUCJIS"
      You should get the contents of the data file dumped to the screen.
      Now try "sampR koi8-r"

      I get the following:
      run sampR koi8-r
              CHARSET: koi8-r
      java.lang.ArrayIndexOutOfBoundsException: 160
              at sun.io.ByteToCharSingleByte.convert(ByteToCharSingleByte.java:84)
              at java.io.InputStreamReader.convertInto(InputStreamReader.java)
              at java.io.InputStreamReader.fill(InputStreamReader.java)
              at java.io.InputStreamReader.read(InputStreamReader.java)
              at java.io.BufferedReader.fill(BufferedReader.java)
              at java.io.BufferedReader.readLine(BufferedReader.java)
              at sampR.main(sampR.java:17)

            lshisunw Limin Shi (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: