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

PlusSign Use URLDecoder Class Returns Blank Space

XMLWordPrintable

    • x86_64
    • windows_7

      ADDITIONAL SYSTEM INFORMATION :
      java version "1.8.0_201"
      Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
      Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      PlusSign Use URLDecoder Class Return Black Space
      But Browse Decoder PlusSign Return PlusSign

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Main the run this code

      String decodeStr = URLDecoder.decode("+", "UTF-8");
      System.out.println(decodeStr.equals("+"));

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      plus sign
      ACTUAL -
      blank space

      ---------- BEGIN SOURCE ----------
      String decodeStr = URLDecoder.decode("+", "UTF-8");
      System.out.println(decodeStr.equals("+"));
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      find java.net.URLDecoder
      150 row
      editor sb.append(' '); modify to sb.append('+');

            psonal Pallavi Sonal (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: