I am working on Java. Here is my code
response = URLEncoder.encode(response, "UTF-8").replaceAll("\\+", "%20");
Problem comes when there is a ' (single quote) in the string response. It gets encoded to \'.
eg - 'Collective Dynamics of Complex Networks' comes as
\'Collective Dynamics of Complex Networks\'
I want it to remain as it is. What should I do?