Replace some special characters with browser code

I am facing a strange situation here.

I am parsing an image link through json and getting the url:’s-Team-Roles-100x100.jpg

Whenever I paste this in browser then the image is showing,but whenever I paste it in a notepad then the following url is showing up:

As you can apostrophe is replaced by %E2%80%99 and Json cannot detect the
apostrophe and as a result it is throwing exception:

06-15 14:01:16.955: W/System.err(10146):’s-Team-Roles-100x100.jpg

How can I replace such special characters with their corresponding code so that Json can detect them??

I tried UTF-8 encoding and decoding but it is not working.Please give a generalised solution but not for a specific character.

Another one:–-An-8-step-Outline-to-Motivate-Goal-Accomplishment-100x100.jpg

But when I paste the link from browser to a notepad it shows:

Source: json

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.