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

Add java.net.URLEncoder.encode(String, Charset)

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE REQUEST :
      I suggest to add

      java.net.URLEncoder.encode(String, Charset)
      java.net.URLEncoder.decode(String, Charset)

      methods.

      JUSTIFICATION :
      For a developer it's more convenient to write:

      URLEncoder.encode("abc", StandardCharsets.UTF_8)

      rather than:

      try {
          URLEncoder.encode("abc", "utf-8");
      } catch (UnsupportedEncodingException e) {
          // should never happen anyway.
      }


            chegar Chris Hegarty
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: