urlemacselispurlencodeurldecode

How can I "URL decode" a string in Emacs Lisp?


I've got a string like "foo%20bar" and I want "foo bar" out of it.

I know there's got to be a built-in function to decode a URL-encoded string (query string) in Emacs Lisp, but for the life of me I can't find it today, either in my lisp/ folder or with Google.

What is it called?


Solution

  • org-link-unescape does the job for very simple cases ... w3m-url-decode-string is better, but it isn't built in and the version I have locally isn't working with Emacs 23.