My Java web application submits an AJAX request that returns JSON such:
{\'value\': \'aériennes\'}
When \'aériennes\' is displayed in the w
The answers here helped me solve my problem, although it's not completely related. I use the javax.ws.rs API and the @Produces and @Consumes annotations and had this same problem - the JSON I was returning in the webservice was not in UTF-8. I solved it with the following annotations on top of my controller functions :
@Produces(javax.ws.rs.core.MediaType.APPLICATION_JSON + "; charset=UTF-8")
and
@Consumes(javax.ws.rs.core.MediaType.APPLICATION_JSON + "; charset=UTF-8")
On every endpoint's get and post function. I wasn't setting the charset and this solved it. This is part of jersey so maybe you'll have to add a maven dependency.