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

default coding for URL Encoder and Decoder different in 1.3 and 1.4

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • core-libs
    • beta3
    • generic
    • generic
    • Verified



      Name: nt126004 Date: 08/30/2001


      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)

      URLEncoder.encode and URLDecoder.decode use different default encoding in 1.3
      and 1.4

      Existing programs rely on 1.3 default encoding (ASCII) and he two method can't
      take any parameter.

      In 1.4, calling this methods with no parameter will use the 1.4 default
      encoding (UTF-8). So decoding existing data will produce wrong results.

      Calling with a parameter specifying the correct encoding will not work in 1.3

      So, the user has to synchronize switching to 1.4 with rewriting the code which
      is celarly unacceptable.
      (Review ID: 131000)
      ======================================================================

            michaelm Michael McMahon
            nthompsosunw Nathanael Thompson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: