You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Anders Lundberg (JIRA)" <ji...@apache.org> on 2012/08/08 18:16:21 UTC
[jira] [Created] (WW-3863) Incorrect encoding in JsonResult
Anders Lundberg created WW-3863:
-----------------------------------
Summary: Incorrect encoding in JsonResult
Key: WW-3863
URL: https://issues.apache.org/jira/browse/WW-3863
Project: Struts 2
Issue Type: Bug
Components: Plugin - JSON
Affects Versions: 2.3.4
Reporter: Anders Lundberg
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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WW-3863) Incorrect encoding in JsonResult
Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart updated WW-3863:
------------------------------
Priority: Minor (was: Major)
> Incorrect encoding in JsonResult
> --------------------------------
>
> Key: WW-3863
> URL: https://issues.apache.org/jira/browse/WW-3863
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - JSON
> Affects Versions: 2.3.4
> Reporter: Anders Lundberg
> Priority: Minor
> Fix For: 2.3.8
>
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WW-3863) Incorrect encoding in JsonResult
Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510398#comment-13510398 ]
Lukasz Lenart commented on WW-3863:
-----------------------------------
What's wrong with setting up struts.i18n.encoding ?
> Incorrect encoding in JsonResult
> --------------------------------
>
> Key: WW-3863
> URL: https://issues.apache.org/jira/browse/WW-3863
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - JSON
> Affects Versions: 2.3.4
> Reporter: Anders Lundberg
> Priority: Minor
> Fix For: 2.3.8
>
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WW-3863) Incorrect encoding in JsonResult
Posted by "Anders Lundberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13510669#comment-13510669 ]
Anders Lundberg commented on WW-3863:
-------------------------------------
Same reason as not using struts.i18n.encoding in WW-3059. A struts application supports any encoding, thanks to struts.i18n.encoding, but a json string, submitted and received by XMLHttpRequest, has to be UTF-8 encoded.
> Incorrect encoding in JsonResult
> --------------------------------
>
> Key: WW-3863
> URL: https://issues.apache.org/jira/browse/WW-3863
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - JSON
> Affects Versions: 2.3.4
> Reporter: Anders Lundberg
> Priority: Minor
> Fix For: 2.3.8
>
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WW-3863) Incorrect encoding in JsonResult
Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WW-3863?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart updated WW-3863:
------------------------------
Fix Version/s: 2.3.7
> Incorrect encoding in JsonResult
> --------------------------------
>
> Key: WW-3863
> URL: https://issues.apache.org/jira/browse/WW-3863
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - JSON
> Affects Versions: 2.3.4
> Reporter: Anders Lundberg
> Fix For: 2.3.7
>
>
> 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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira