
I am using a webservice in myproject.I wrote a webservice client method, when I call this method I get the json object which has the data. Then I extract that object in jsp and using it to display. the problem is: I need to display some arabic characters here which I am getting from json object.when I send it to browser it is displaying صÙ?Ù?دÙ?Ù?Ø© سÙ?Ù?د Ù?Ù?Ù?Ù?Ù?أرب like characters instead of arabic characters.
JSON Oject:
"results": [ { "attributes": { "OBJECTID": "35", "FACILITYTYPE": "Pharmacy", "FACILITYSUBTYPE": "24 Hr Pharmacy", "COMMERCIALNAME_E": "SADD MAARAB PHARMACY", "COMMERCIALNAME_A": "??????? ???? ????????", "TELEPHONE": "5832625", "FAX": "5833266", }, "geometryType": "esriGeometryPoint", }, { "attributes": { "OBJECTID": "1", "FACILITYTYPE": "Pharmacy", "FACILITYSUBTYPE": "24 Hr Pharmacy", "COMMERCIALNAME_E": "GAYATHY HOSPITAL PHARMACY", "COMMERCIALNAME_A": "????? ?????? ?????", "TELEPHONE": "28741666", "FAX": "28742008", }, "geometryType": "esriGeometryPoint", } ]}
displaying data in jsp:
<% for (Object object : results) { JSONObject jobj = (JSONObject)object; if ( jobj != null && jobj.containsKey( "attributes" ) ) { JSONObject att= (JSONObject) jobj.get("attributes");
%>
When I run this JSP, I am getting unwanted characters instead of Arabic characters. Where I did wrong?
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.