这是什么类型的编码?
您使用哪种编码将 http:// 编码为 http%253A%252F%252F
HttpUtility.UrlEncode 给出 http%3a%2f%2f
What kind of encoding do you use to encode http:// as http%253A%252F%252F
HttpUtility.UrlEncode gives http%3a%2f%2f
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您看到的是已通过 UrlEncode 两次的文本。
第二次将
%
符号更改为%25
。无论如何,通过 UrlEncode 传递整个 URL 是不常见的,除非您将其作为另一个 URL 中的参数传递(例如,用于重定向)。
What you're looking at is text that has been passed through UrlEncode twice.
The second time changes the
%
symbols to%25
.It's unusual to pass an entire URL through UrlEncode anyway, unless you are passing it as a parameter in another URL (for redirection, for instance).
看起来
UrlEncode
被调用了两次,将文字%
编码为%25
(顺便说一下,这是正确的结果)。It looks like
UrlEncode
was called twice, encoding the literal%
as%25
(which is the correct result, by the way).