Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-468

ContainerRequestParameter.getString(String encoding) not working

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3
    • 3
    • Engine
    • None
    • Windows XP, Java 1.5.0_04

    Description

      Using the method
      ContainerRequestParameter.getString(String encoding) does not decode the String.

      When executing a sling page with the url:
      standardportal.html?q=%C3%A4%C3%B6%C3%BC

      then using
      SlingHttpServletRequest.getParameter("q").getString("UTF-8")
      is not returning äöü but äöü

      but when doing the decode manually
      new String(SlingHttpServletRequest.getParameter("q").getString().getBytes(),"UTF-8")
      is returning äöü.

      Attachments

        Activity

          People

            cziegeler Carsten Ziegeler
            tomroethlisberger Thomas Röthlisberger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: