In my Android app I am loading json data with a Volley JsonArrayRequest
. The data were created by myself and I saved them with Sublime with UTF-8 encoding. When
This is worked as a charm for me,, I just created a static method from @Muhammad Naeem's answer,, Thanks Muhammed..
public static String fixEncodingUnicode(String response) {
String str = "";
try {
str = new String(response.getBytes("ISO-8859-1"), "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
String decodedStr = Html.fromHtml(str).toString();
return decodedStr;
}
To specify in server part set utf-8 in content type like "text/html;charset=utf-8"