Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3863

Incorrect encoding in JsonResult

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3.4
    • 2.3.8
    • Plugin - JSON
    • None

    Description

      org.apache.struts2.json.JSONResult uses the configured default encoding (in the struts properties, with the "struts.i18n.encoding" key) when setting the charset part in the response's content type.

      Shouldn't JSONResult.getEncoding() always return UTF-8, similar to the resolution of WW-3059?

      A simple workaround is to override JSONResult.getEncoding() and let it return UTF-8 but it would be preferrable if this was included in the distribution.

      Attachments

        Activity

          People

            lukaszlenart Lukasz Lenart
            gastonx99 Anders Lundberg
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: