In JSON response of php webservice i get ' instead of apostrophe,How can I parse the JSON response with special characters in android?
Edited
My Http connection method code -
InputStream is = null;
String response = null,value = null;
try {
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpGet httpPost = new HttpGet(url);
HttpResponse httpResponse = httpClient.execute(httpPost);
HttpEntity httpEntity = httpResponse.getEntity();
is = httpEntity.getContent();
}
catch (UnknownHostException e) {
e.printStackTrace();
}
catch (UnsupportedEncodingException e) {
e.printStackTrace();
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8"), 8);
String line = null;
while ((line = reader.readLine()) != null) {
value=line.trim();
}
is.close();
response = URLEncoder.encode(value,"UTF-8");
} catch (Exception e) {
Log.e("Buffer Error", "Error converting result " + e.toString());
}
When apply URLDecoder no effect on response and when try with URLEncoder in response some symbols and extra char are appeded like (%20d/).