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

URLEncoder should specify that replacement bytes will be used in case of coding error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 22
    • None
    • core-libs
    • b26

      The long standing behaviour in URLEncoder has been to use the CharsetEncoder replacement bytes if a character cannot be encoded.

      The API documentation of URLEncoder.encode should spell that out and refer to {@link CharsetEncoder##cae}

      See https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/nio/charset/CharsetEncoder.html#cae

      Note: this will require a CSR

            dclarke Darragh Clarke
            dfuchs Daniel Fuchs
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: