Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet Unwanted characters instead of arabic characters
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


venkatesh
Unwanted characters instead of arabic characters
0 Answer(s)      3 years and 11 months ago
Posted in : JSP-Servlet


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");

%>

<%= att.get("COMMERCIALNAME_E") %> <%= att.get("COMMERCIALNAME_A") %> <%= att.get("TELEPHONE") %> <%= att.get("FAX") %> <%}} %>

When I run this JSP, I am getting unwanted characters instead of Arabic characters. Where I did wrong?


Advertisement
View Answers

Related Tutorials/Questions & Answers:
Unwanted characters instead of arabic characters
Unwanted characters instead of arabic characters  I am using...;%}} %> When I run this JSP, I am getting unwanted characters instead of Arabic... ص??د??ة س??د ?????أرب like characters instead of arabic
Stripping of unwanted characters from string
Stripping of unwanted characters from string  how to strip off unwanted characters from a string   Hi Friend, Try this: public class StripCharacters { public String strip(String s) { String st
Advertisements
Java characters
Java characters  How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters
Protect Special Characters.
Protect Special Characters.  How To Protect Special Characters in Query String
special characters in my HTML
special characters in my HTML  How do I get special characters in my HTML
special characters in my HTML
special characters in my HTML  How do I get special characters in my HTML
remove special characters iphone
remove special characters iphone  remove special characters iphone   Remove special characters iphone from Password NSString *outputString = [passwordString stringByReplacingOccurrencesOfString:@"%" withString
regular expression for special characters
regular expression for special characters  How to find out regular expression for special characters
Count number of characters in a column.
Count number of characters in a column.  I just need you suggestions. Am from Biology Back ground. I just need to find out number of characters... to count characters in 1st, 2nd, 3rd columns seperatly and also print flase if i
PDF Generation for unicode characters
PDF Generation for unicode characters  Hi, How a PDF file having unicode characters is generated in JSP
replace special characters in html
replace special characters in html  How can i replace the special characters in HTML?   Special Character in HTML HTML has a long list of special characters symbol that can be used anywhere throughout the HTML Code
Removing characters from a string
Removing characters from a string  Removing characters from a string   Example: public class CharReplace{ public static void main(String []args){ String str="Hello 123.you are At 3456"; String
Uppercase Characters in Java
Uppercase Characters in Java  I want to know how to UpperCase Characters in Title useing a java code...?   Use toUpperCase() method to convert the string in uppercase letters. class UppercaseString { public static
Limiting characters - JSP-Servlet
Limiting characters  Iam doing a jsp project. In this i have a text area which should accept not more than 300 characters. I solved this with backspace and delete keys. But, i cannot solve problem of pasting through shortcut ctrl
characters java - Java Beginners
characters java  HELLO MAM AND SIR I ASK YOUR HELP HOPE YOU GONNA....(REmember that the alphabet contains 52 characters if you count uppercase... you input that word) The word howdy has 5 characters. What letter would you
Remove unknown characters php - PHP
Remove unknown characters php  i am looking for a script that can remove unknown characters in PHP code except white spaces
Iterating the Characters of a String
Iterating the Characters of a String This section illustrates you how to iterate the characters of a string. For bi-directional iteration over the text , you... this interface for the string. In CharacterIterator, characters are indexed
How to avoid the Special characters? - JDBC
How to avoid the Special characters?  I have a form in jsp... can I override special characters by submitting a form through JAVA...,   hi friend, To avoid special characters we have imposed some
How To Protect Special Characters in Query String?
How To Protect Special Characters in Query String?  How To Protect Special Characters in Query String
problems in parsing the xml with the special characters
problems in parsing the xml with the special characters  Hi, I have a problem, in while parsing the xml with special characters apstrophe('). I am getting the exception Caused by: javax.xml.transform.TransformerException
write Greek ( or other non-ASCII/8859-1 ) characters to a database
write Greek ( or other non-ASCII/8859-1 ) characters to a database  How do I write Greek ( or other non-ASCII/8859-1 ) characters to a database
Escaping Special Characters in a Pattern
Escaping Special Characters in a Pattern   ... characters from the given string or text. Here, you can learn the way of detecting all special characters present in the given string. Program Result
how can i remove newline characters and tabs
how can i remove newline characters and tabs   how can i remove newline characters and tabs ? but i wont to using GUI .please help
MySQL replace all non alphanumeric characters
MySQL replace all non alphanumeric characters  Hi, How to replace all non alphanumeric characters in MySQL? Thanks
How to find the first 6 characters of string in regex?
How to find the first 6 characters of string in regex?  How to find the first 6 characters of string in regex. I know the Syntax is to String.substring(strtindex, endindex-1) For first six characters is: String
how to get string between two characters
how to get string between two characters  hgow to get string from between two characters. ex:hareesh.arava@gmail.com from the above word i want a string between characters . and @ send the required method and give better example
Remove duplicate characters from the string
Remove duplicate characters from the string In this tutorial, you will learn how to remove duplicate characters from the string. Java has provide several methods to examine the content of string, finding characters or substrings
How to Remove Repeated Characters from the String?
How to Remove Repeated Characters from the String?  Hi, I trying to develop an application which will remove the repeated characters from... the example of how to remove repeated characters from the string. Please visit
Advertisements
 

 

 

DMCA.com