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

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -