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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 9
    • 9
    • core-libs
    • b06
    • 9
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: