How can I set the charset with JAX-RS? I\'ve tried @Produces(\"text/html; charset=UTF-8\") but that was ignored and only text/html was send with th
@Produces(\"text/html; charset=UTF-8\")
text/html
What I do is to get an instance of the servlet response object:
protected @Context HttpServletResponse response;
And then set the character encoding to utf-8:
response.setCharacterEncoding("utf-8");
That works for me.