Visual FoxPro
Visual FoxPro
URL Encoding and Decoding
Demonstrates URL encoding/decoding using the HTTP convenience methods.Chilkat Visual FoxPro Downloads
LOCAL loHttp
LOCAL s
LOCAL lcEncoded
LOCAL lcDecoded
loHttp = CreateObject('Chilkat.Http')
s = "Hello World! 100% sure."
lcEncoded = loHttp.UrlEncode(s)
? "URL encoded: " + lcEncoded
* Space → %20
* ! → %21
* % → %25
lcDecoded = loHttp.UrlDecode(lcEncoded)
? "URL decoded: " + lcDecoded
* Output:
* URL encoded: Hello%20World%21%20100%25%20sure.
* URL decoded: Hello World! 100% sure.
RELEASE loHttp