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

sun.io.MalformedInputException when converting with Korean encoding (Cp970)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • None
    • 1.4.2
    • core-libs

      Name: dk106046 Date: 07/31/2003

      When trying to convert a file containing Korean characters, a sun.io.MalformedException is thrown:

      sun.io.MalformedInputException
              at sun.io.ByteToCharEUC.convert(ByteToCharEUC.java:100)
              at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:247)
              at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:278)
              at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
              at java.io.InputStreamReader.read(InputStreamReader.java:167)
              at java.io.Reader.read(Reader.java:100)
              at krencode.main(krencode.java:24)

      This bug can be reproduced on the 1.4.2 and 1.3.1_08 JDKs.

      I can send provide a testcase on request - I didn't include it here because the ascii values in the test file would probably get messed up.

      This bug has been fixed in the IBM JDK - I can provide the diffs if required. The file that needs to be fixed is "ByteToCharEUC.java", as suggested by the stack trace above.
      ======================================================================

            ilittlesunw Ian Little (Inactive)
            dkorbel David Korbel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: