I made a small Rest webservice using Jersey 1.11. When i call the url that returns Json, there are problems with the character encoding for non english characters. The corre
i got the same issue in servlet
kindly use : resp.setContentType("application/json;charset=utf-8");
public static void flashOutput(HttpServletRequest req
, HttpServletResponse resp
, String output) {
try {
Utils.print2("output flash"+output);
resp.setContentType("application/json;charset=utf-8");
PrintWriter pw = resp.getWriter();
pw.write( new String(output.getBytes("UTF-8")));
pw.close();
resp.flushBuffer();
} catch (Exception e) {
// TODO: handle exception
}
}// end flashOutput