url cyrillic encoding issue (with webbrowser control)
问题 I use C# web browser to send request. But url includes cyrillics symbols, and I use proxy so I need to encode the url. The origin url: http://mysite.com/info?q=москва+дизайн I need http://mysite.com/info?q=%E4%E8%E7%E0%E9%ED+%EC%EE%F1%EA%E2%E0 What C# functions exist to make that? 回答1: You can use System.Web.HttpUtility.UrlEncode(). Its default encoding is utf-8, yours look like Windows code page 1251 with the words reversed. I suppose you ought to pass Encoding.Default. The closest match is: