Possible Duplicate:
Standard URL encode function?
I need to transofrm a Delphi string (like TEdit.Caption
) in a "url capable" string.
I need this because I will open google maps programmatically like in TEdit
I write "High Street, Sydney"
and then i would like to open the browser at maps.google.com/maps?q=High+Street+Sidney
Is there a ready function to do this, also to parse accents?
You can add IdURI unit from Indy to your uses clause, and use TIdURI.URLEncode() method to encode a URL, and TIdURI.Decode() to decode an encoded URL to a normal string.