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

Incorrect encoding in JsonResult

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.4
    • Fix Version/s: 2.3.8
    • Component/s: Plugin - JSON
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: