when using browser, this url will be encoded by browser automatically:
I didn't find url encode/decode functions in newlisp manual, does anybody implement this before?
when using browser, this url will be encoded by browser automatically:
I didn't find url encode/decode functions in newlisp manual, does anybody implement this before?
Code: Select all
(define (urlencode txt)
(join (map (fn (c) (format "%02X" (char c))) (explode txt))))
Code: Select all
(define (urldecode txt)
(replace "%(..)" (replace "+" (copy txt) " ") (char (int $1 32 16)) 0))