可以使用站长之家工具直接转中文域名编码在线转换,Punycode编码,Punycode转换
下面方法也可以把非英文URL转为英文URL
public static string Punycode(string str){if (string.IsNullOrWhiteSpace(str))return str;var idn = new IdnMapping();var url = idn.GetAscii(str);return url;}
时间:2022-06-07 14:33:46
可以使用站长之家工具直接转中文域名编码在线转换,Punycode编码,Punycode转换
下面方法也可以把非英文URL转为英文URL
public static string Punycode(string str){if (string.IsNullOrWhiteSpace(str))return str;var idn = new IdnMapping();var url = idn.GetAscii(str);return url;}