I need to use special characters for stringentity
as below.
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost
Change to:
HttpEntity entity = new StringEntity("test®", "UTF-8");
Instead of using StringEntity I've just used ByteArrayEntity and it worked:
String string = "ã@í";
HttpEntity httpEntity = new ByteArrayEntity(string.getBytes("UTF-8"));
request.addHeader("Content-type", "application/xml;charset=UTF-8");
request.setEntity(httpEntity);