Tcl
Tcl
URL Encoding and Decoding
Demonstrates URL encoding/decoding using the HTTP convenience methods.Chilkat Tcl Downloads
load ./chilkat.dll
set http [new_CkHttp]
set s "Hello World! 100% sure."
set encoded [CkHttp_urlEncode $http $s]
puts "URL encoded: $encoded"
# Space → %20
# ! → %21
# % → %25
set decoded [CkHttp_urlDecode $http $encoded]
puts "URL decoded: $decoded"
# Output:
# URL encoded: Hello%20World%21%20100%25%20sure.
# URL decoded: Hello World! 100% sure.
delete_CkHttp $http