I have multiple REST endpoints that return JSON objects. For most locales the responses are correct (all symbols are correctly shown in the response and the Content-Type is application/json).
If I provide the Accept-Language header with value "en_NL", the Content-Type header changes to "application/json;charset=ISO-8859-1. The response body also contains incorrect encoded symbols. (eg. € turns into €).
I'm not sure where the content-type header changes and I can't find any trace in any filter/config or jaxb.
For (un)marshalling I use jaxb. The application is build using Spring 4.1.7 and it is hosted on a tomcat server.
Controller example:
@RequestMapping(value = "/by-bundle", method = RequestMethod.GET)
@ResponseBody
public SbMessageMap getByBundleCodes(final @RequestParam("groups") String[] groups) {
// return json object here
}
Thanks in advance!