日期:2014-05-18 浏览次数:20793 次
public static string UrlDecode(string input) { var arr = input.Split(new[] {'%'}, StringSplitOptions.RemoveEmptyEntries); var bytes = arr.Select(s => Convert.ToByte(s, 16)).ToArray(); var result = Encoding.GetEncoding("GB2312").GetString(bytes, 0, bytes.Length); return result; }