我有一个包含字符 § 的查询字符串,例如/search?q=5§2。这应该被编码为/search?q=5%c2%a72,但HttpContext.Current.Request.QueryString.ToString()给了我q=5%u00a72。由于某种原因%c2丢失了。
1017 次
1 回答
1
Encoding is ok, you can read more details here http://en.wikipedia.org/wiki/Percent-encoding ("Non-standard implementations" part)
To not think about it you can just use HttpUtility.UrlDecode() to obtain real q=5§2 string regardless used encoding.
于 2013-04-02T13:22:21.500 回答