struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johannes Geppert (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (WW-3536) Specify UTF-8 content type in JsonLibHandler
Date Wed, 27 Apr 2011 14:15:03 GMT

     [ https://issues.apache.org/jira/browse/WW-3536?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Johannes Geppert reassigned WW-3536:
------------------------------------

    Assignee: Johannes Geppert

> Specify UTF-8 content type in JsonLibHandler
> --------------------------------------------
>
>                 Key: WW-3536
>                 URL: https://issues.apache.org/jira/browse/WW-3536
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - REST
>    Affects Versions: 2.1.8.1
>         Environment: Java 5; Firefox 3.6
>            Reporter: Simon Legault
>            Assignee: Johannes Geppert
>            Priority: Trivial
>
> Response returned by the REST plugin does not specify the character encoding. Firefox
3.6 reads the incoming JSON incorrectly for non-ANSI characters. Specifying the character
encoding explicitly (;charset=utf-8) fixes the problem.
> public class JsonLibHandler implements ContentTypeHandler {
>         ...
> 	public String getContentType() {
> 		return "text/javascript;charset=utf-8";
> 	}
>         ...
> }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message