我如何“URL 解码"?Emacs Lisp 中的字符串? [英] How can I "URL decode" a string in Emacs Lisp?
本文介绍了我如何“URL 解码"?Emacs Lisp 中的字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个像foo%20bar"这样的字符串;我想要foo bar"摆脱它.
I've got a string like "foo%20bar" and I want "foo bar" out of it.
我知道必须有一个内置函数来解码 Emacs Lisp 中的 URL 编码字符串(查询字符串),但是对于我的生活,我今天找不到它,无论是在我的 lisp 中/ 文件夹或使用 Google.
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.
它叫什么?
推荐答案
org-link-unescape
可以处理非常简单的情况... w3m-url-decode-string
更好,但它不是内置的,而且我在本地拥有的版本不适用于 Emacs 23.
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.
这篇关于我如何“URL 解码"?Emacs Lisp 中的字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文