UTF-8 problem

UTF-8 problem

nenadnenad Posts: 2Questions: 1Answers: 0

In my example variable json2 contains UTF-8 characters values.

    Gson gson = new GsonBuilder().setPrettyPrinting().create();
    String json2 = gson.toJson(personJsonObject);
    return json2;

but at html page I got character '?' insted of čćšđ ....

Html jsp file is UTF-8 and contain in header <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Here is view

http://organic-nkolar.rhcloud.com/

Thank you in advance.

Answers

  • nenadnenad Posts: 2Questions: 1Answers: 0

    Problem solved by

    @RequestMapping(value = "/springPaginationDataTables.web", method = RequestMethod.GET, 
            produces = "application/json; charset=UTF-8")
    
This discussion has been closed.