java - URLEncoder troubles -


i've got string ruby on rails, should converted ruby%20on%20rails, urlencoder says ruby+on+rails. try:

string encoded = urlencoder.encode("ruby on rails"); system.out.println(encoded); 

is happening because encode() method deprecated?

urlencoder doesn't uri encoding, application/x-www-form-urlencoded, converts spaces + signs. if want them converting %20 need uri encoding instead, such spring's uriutils.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -