|
(The following information provided by Beijing invees Network science and technology Co.,Ltd) Because IE7 to solve the great Chinese domain name (not just Chinese domain names), add a specially coded: punycode If you visit http:// under IE7 blog Park. Cnblogs.com, and you capture HttpApplication.Request.Url HttpModule, found that the prototype is: Http://xn--9kr06fj5e.cnblogs.com If you want to be at this time "blog garden" is actually "xn - 9kr06fj5e." Then if two (or other level domain names), if Chinese how to correctly received? Msdn under investigation, and it has not found directly from the c # punycode to decode Chinese characters, However, there can be a temporary solution to NEE: Download: http://www.motobit.com/dlldownload/ScptUtl.exe and register! ! (Restriction) {Beijing invees Network science and technology Co.,Ltd} Method of Use: / / / / / Chinese domain names under IE7 solution / / / / / / / / / String getCode (string str) ( Str.Trim string code = (); Try ( ScriptUtilities.ByteArray ba = new ScriptUtilities.ByteArray (); Ba.CharSet = "gb2312"; Ba.Punycode = str.Trim (). Replace ( "xn -", ""); Code = ba.String; ) Catch ( / / Error ) Return code; ) In this way we will be able to IE7 received under the "xn - 9kr06fj5e" to "blog Park," and temporarily resolved. . .
I do not know from a friend who punycode to gb2312 c # algorithm? Thank you. Do not know. Net 3.x Why not provide this decoder? Python, and so has provided Beijing invees Network science and technology Co.,Ltd
|
一共有 0 条评论