字符串中夹杂unicode字符,如何解码

     static void Main(string[] args)
        {
            Console.WindowWidth = 120;
            WebUtil web = new WebUtil();
            while (true)
            {
                Console.WriteLine("输入地址:");
                string url = Console.ReadLine();
                Console.WriteLine(url);

                string html = web.DownHtml(url);

                string res = Regex.Unescape(html);//完成了解码
                Console.WriteLine(res);
            }
        }
\u9996\u672b\u8f66\u65f6\u95f4</th><td  style="background:#FFFFFF;line-height:22px;padding:0px 8px" >\'+this._busLine.startTime+"-"+this._busLine.endTime+"</td></tr>");cG.push(\'<tr><td style="95px;line-height:22px;padding:0px 8px;text-align:left;vertical-align:top;background:#F4F4F4" >\u6240\u5c5e\u516c\u53f8</th><td  style="background:#FFFFFF;line-height:22px;padding:0px 8px" >\'+this._busLine.company+"</td></tr>");cG.push("</tbody></table>");if(this._busLine._poiType==4){cG.push(\'<p style="margin:2px 0px;font:12px \'+b2.fontFamily+\';">\u6cbf\u7ebf\u5730\u94c1\u7ad9:</p>\')}else{cG.push(\'<p style="margin:2px 0px;font:12px \'+b2.fontFamily+\';">\u6cbf\u7ebf\u516c\u4ea4\u7ad9\u70b9:</p>\')}cG.push(\'<table style="100%;font:12px \'+b2.fontFamily+\';" ><tbody>\');for(var cF=0,T=this._busLine.getNumBusStations();cF<T;cF++){var cD=cF+1;cG.push(\'<tr><td style="20px">\'+cD+"</th><td><a id=aStop_"+cE+"_"+cF+\' style="color:blue" href="javascript:void(0)" onclick=Instance(\\\'\'+this.guid+"\')._selectBusStop("+cE+","+cF+")>"+this._busLine.getBusStation(cF).name+"</a></td></tr>")}cG.push("</tbody></table>");cC.innerHTML=cG.join("")}var cB=a0.G("divResult"+this.guid);this._triggerCbk(t.CBK_BUSLINEHTML_SET,cB)}},_renderBusLineMap:function(cC){if(this._opts.renderOptions.map&&this._busLine&&this._busLine.getNumBusStations()>0){this._clearOverlays();ai.addRoute(this._opts.renderOptions.map,this._busLine.getPath());var cG=this._busLine.getPolyline();this._triggerCbk(t.CBK_POLYLINES_SET,cG);this._stops=[];for(var cE=0,T=this._busLine.getNumBusStations();cE<T;cE++){var cF=this._busLine.getBusStation(cE).position;var cB=this._busLine.getBusStation(cE).name;var cD=ai.addStationPoi(this._opts.renderOptions.map,cF,cB);(function(cJ,cH,cI){cJ.addEventListener("click",function(){var cK=new bG(cH);cK.addEventListener("open",function(){var cL=a0.G("aStop_"+cC+"_"+cI);if(cL){cL.style.backgroundColor="#cccccc"}});cK.addEventListener("close",function(){var cL=a0.G("aStop_"+cC+"_"+cI);if(cL){cL.style.backgroundColor="#ffffff"}});cJ.openInfoWindow(cK)})})(cD,cB,cE);cD._stName=cB;this._stops.push(cD)}this._triggerCbk(t.CBK_MARKERS_SET,this._stops);if(this._opts.renderOptions.autoViewport){this._opts.renderOptions.map.setViewport(cG.getPath(),{margins:[5,5,5,5]})}}},_selectBusStop:function(cC,cB){if(this._opts.renderOptions.map&&this._stops&&this._stops.length>0){var cD=this._stops[cB];if(cD._stName){var cE=new bG(cD._stName);cE.addEventListener("open",function(){var cF=a0.G("aStop_"+cC+"_"+cB);if(cF){cF.style.backgroundColor="#cccccc"}});cE.addEventListener("close",function(){var cF=a0.G("aStop_"+cC+"_"+cB);if(cF){cF.style.backgroundColor="#ffffff"}});cD.openInfoWindow(cE)}}else{if(this.preA){this.preA.style.backgroundColor="#ffffff"}var T=a0.G("aStop_"+cC+"_"+cB);if(T){T.style.backgroundColor="#cccccc"}this.preA=T}},_clearOverlays:function(){if(this._opts.renderOptions.map){this._opts.renderOptions.map.clearOverlays()}},_setStatus:function(T){if(typeof T=="number"){this._status=T}else{delete this._status}}});function H(T){this.keyword=T.keyword||"";this.city=T.city;this.moreResultsUrl=T.moreUrl;this._listItems=T.listItems&&T.listItems.slice(0)||[];this._cityCode=T._cityCode}a0.extend(H.prototype,{getBusListItem:function(T){if(this._listItems[T]){return this._listItems[T]}},getNumBusList:function(){return this._listItems.length}});function x(T){this.name=T.name||"";this.startTime=T.startTime||"";this.endTime=T.endTime||"";this.company=T.company||"";this._polyline=T.polyline||{};this._stations=T.stations&&T.stations.slice(0)||[];this._poiType=T._poiType||2}a0.extend(x.prototype,{getBusStation:function(T){if(this._stations[T]){return this._stations[T]}},getNumBusStations:function(){return this._stations.length},getPolyline:function(){return this._polyline},getPath:function(){if(this._polyline.getPath()){return this._polyline.getPath()}}});');

如图:html中夹杂着unicode编码,如何解码呢?

原文地址:https://www.cnblogs.com/i80386/p/2617988.html