I'm developing an android application that searches in a database for advertiser names that are near your current position. To do that, it access some web services that are on the company's servers. Basically the application sends the parameters to the web service, and the web service returns the query results. But, some advertiser names have special characters such as "/" or spaces. I tried replacing spaces with %20 and worked fine, but when sending "/" character I receive errors. I tried replacing it with a %2F as I did with the space but is still not working. Any ideas of what should I do?
EDIT
I used as suggested the
String query = URLEncoder.encode("some value", "utf-8");
But now the server is returning an HTTP 404.11 error. I guess what I should fix next is the server code?