I am getting data from my db which contains words in Hebrew. Then I am getting this data from ResultSet
putting into a String and then putting it to a JSONObject
.
Here is the code:
response.setContentType(application/json);
...
String str = rs.getString['name'];
...
JSONObject obj = new JSONObj();
obj.put("name", str);
...
response.getWriter().write(obj.toString());
Note:
I am using java as my backend and my db is mysql. The db configured to UTF-8
Result:
{"name":"??????"}