• Post Reply Bookmark Topic Watch Topic
  • New Topic

encoding special characrers  RSS feed

 
Naresh Talluri
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have a problem while decoding a string,,
i have data like " &lt; "....i need to get it as "&<"
i used URLDecoder clss's decode(" &lt; ");
but iam getting the same string like " &lt; "...
can you please let me know how can i do this one...
-Naresh
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
URL encoding and HTML encoding are two different things.

What are you trying to do with this data?
Are you trying to display it in a web page or are you building a URL/QueryString/PostString?
 
Naresh Talluri
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here iam going to populate this data in one jsp,,
but while populating iam using xml to parse the data , here iam getting
error like data is not well-formed because of these special characters...
from DB iam getting encoded data like "<", in java code iam going to
decode as "<" and populating in jsp..
this is what iam trying to do..
[ April 25, 2008: Message edited by: Naresh Talluri ]
 
Naresh Talluri
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you please do the needful asap......
urgent.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Naresh Talluri:
can you please do the needful asap......
urgent.


Naresh,
In an effort to help everyone get the most from our forums, we've compiled a
list of tips for asking questions here. You can find the list in our
FAQ section here.
In particular please see EaseUp to find out why adding 'urgent' or 'asap' to your posts can actually slow down or halt responses to your questions altogether. Often, the answers that you do receive after adding these words will have more to do with the words themselves and contain nothing about your original subject matter.

Again, welcome to JavaRanch and good luck with your question.
-Ben
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!