Reputation: 448
I have set character encoding of the response to UTF-8 by
response.setCharacterEncoding("UTF-8");
Despite that, on the client-side, several characters are broken. I had a look at the response's header in the browser tool, and i found out that the encoding was set to ISO-8859-1.
How can i solve this issue? What is the underlying problem?
Upvotes: 3
Views: 1656
Reputation: 448
I have found the problem:
response.setCharacterEncoding("UTF-8");
must be declared before response.getWriter();
Upvotes: 5