C# 日文网址转punnycode

Uri uri = new Uri(url);
IdnMapping idn = new IdnMapping();
url= url.Replace(uri.Host, idn.GetAscii(uri.Host));

posted @ 2017-08-21 16:10  公众号python学习开发  阅读(191)  评论(0编辑  收藏  举报