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

sun.misc.CharacterDecoder.decodeBuffer should use getBytes(iso8859-1)

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Introduced In Build:
      b06
    • Introduced In Version:
      9
    • Resolved In Build:
      b08

      Description

      The fix for JDK-8036848 replaces the use of deprecated String.getBytes(int,int,byte[],int) method with String.getBytes() causes behavioral change.

      sun.misc.CharacterEncoder uses "iso-8859-1" to encode from byte[] to String and CharacterDecoder uses the deprecated String.getBytes(....) to decode from String to byte[] and it works for non-ascii default encoding platform.

      The sun.misc.CharacterDecoder.decode(String) method now is changed to use the default charset that will not work on platform that the default encoding is not ASCII compatible, such as the IBM ebcdic.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bpb Brian Burkhalter
                Reporter:
                mchung Mandy Chung
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: