My URL String has two parts, first one is
http://abcabc.com/xyz/mmm/lorum/
Second is “abc def ghi”, Here for last part I use
URLEncoder.encode("abc def ghi","utf-8");
This returns me “abc+def+ghi”
Final URL becomes
http://abcabc.com/xyz/mmm/lorum/abc+def+ghi
Which is wrong, It should be
http://abcabc.com/xyz/mmm/lorum/abc%20def%20ghi
Any suggestions?
From wikipedia:
So + is a valid way of encoding a space.
BTW, this is clearly documented: