M20 M20 - 6 months ago 24
Java Question

Decode ASCII characters inside a String

I am looking for a Java instruction to convert

http://dbpedia.org/resource/NVA_%28film%29


to

http://dbpedia.org/resource/NVA_(film)

Answer

Try this

URLEncoder.encode("http://www.your-url.com, "UTF-8");

and this to reverse

URLDecoder.decode(encodedString, "UTF-8");
Comments