I've searched a few times now, but not come up with suitable answer to my problem...
Say I have a URL
http://example.com/query?q=
and I have a query entered by the user such as: "random word £500 bank $"
I want the result to be a properly encoded URL:
http://example.com/query?q=random%20word%20%A3500%20bank%20%24
What's the best way to achieve this? I tried URLEncoder
and creating URI/URL objects but none of them come out quite right.
uri = Uri.parse(url.replace(" ", "%20"))
– Mārtiņš Briedis Mar 10 at 22:18