var text = "俞梦";
//utf-8编码
var s1 = System.Web.HttpUtility.UrlEncode(text);
//%e4%bf%9e%e6%a2%a6
var s2 = System.Web.HttpUtility.UrlEncode(text, System.Text.Encoding.UTF8);
//%e4%bf%9e%e6%a2%a6
//gb2312编码
var s3 = System.Web.HttpUtility.UrlEncode(text, System.Text.Encoding.GetEncoding(936)); //gb2312编码
//%d3%e1%c3%ce
var s4 = System.Web.HttpUtility.UrlEncode(text, System.Text.Encoding.GetEncoding("GB2312"));
//%d3%e1%c3%ce
var s5 = System.Web.HttpUtility.UrlEncode(text, System.Text.Encoding.Unicode);
//%deO%a6h
更多编码 请参考
https://www.cnblogs.com/jhli/p/5911857.html