How do I set the default character encoding on my responses to UTF-8?
I\'ve tried this
System.setProperty(\"file.encoding\", \"UTF-8\"); <
System.setProperty(\"file.encoding\", \"UTF-8\");
It matter when you use Writer();
For me If I write
resp.getWriter().println("Return"); resp.setContentType("text/html; charset=UTF-8");
I won't work
But if I change the sequence
resp.setContentType("text/html; charset=UTF-8"); resp.getWriter().println("Return");
It will be alright