Share |
Back to frequently asked questions

Loading data using Ajax messes up my characters.

Make sure you are using a correct encoding, on the URL, which you receive the data from.
It is recommended to use UTF-8, and the encoding must be set server side, in Java, the following line set's the encoding to UTF-8 in the response.
response.setContentType("text/html; charset=utf-8");
It is also recommended to use technologies like JSON or other forms of wrapping the data.