简体   繁体   English

这是什么编码?

[英]What kind of encoding is this?

What kind of encoding do you use to encode http:// as http%253A%252F%252F 您使用什么样的编码将http://编码为http%253A%252F%252F

HttpUtility.UrlEncode gives http%3a%2f%2f HttpUtility.UrlEncode给出http%3a%2f%2f

What you're looking at is text that has been passed through UrlEncode twice . 您正在查看的是已经通过UrlEncode 两次传递的文本。

The second time changes the % symbols to %25 . 第二次将%符号更改为%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传递整个 URL是不常见的,除非您将其作为另一个URL中的参数传递(例如,用于重定向)。

看起来UrlEncode被调用了两次,将文字%编码为%25 (顺便说一句,这是正确的结果)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM