Today I suddenly encountered a difficult problem, which is the conversion of url encoding.
When you go online, you can often find that the Chinese characters we input are in the form of %xx%xx when the URL is transmitted.
What if we need to extract the above information? If it is something like index.aspx?name=%xx%xx, you can also get the value through request. So don't worry about it so much. But what if these characters are contained in an address instead of parameters?
The correct Chinese encoding can be obtained after conversion using the Uri.UnescapeDataString() function.
string ss = "%e9%ab%98%e6%b8%85%e6%99%b0";
string dd2 = Uri.UnescapeDataString(ss);
Response.Write(dd2);
The final result is: "High definition!"
A little discovery, for your reference. However, I asked someone to find out that Java provides the same function. But I didn't expect .net to be placed in the uri.
Source: Prompt also plays blog