拉下来的页面,主要代码如下:
<script>STK && STK.pageletM && STK.pageletM.view({"pid":"pl_weibo_directtop","js":["apps\/search_v6\/js\/pl\/weibo\/directtop.js?version=20150708173300","apps\/search_v6\/js\/pl\/weibo\/review.js?version=20150708173300"],"css":["appstyle\/searchV45\/css_v6\/pl\/pl_interest.css?version=20150708173300","appstyle\/searchV45\/css_v6\/layer\/layer_re.css?version=20150708173300"],"html":" <div class='WB_cardwrap pl_directarea S_bg2 clearfix'>\n\t<div class=\"search_directarea star_dir \">\n\t <div class=\"list_star clearfix\">\n\t  <div class=\"star_pic\"><a href=\"http:\/\/weibo.com\/u\/3921015143\" target=\"_blank\" suda-data=\"key=tblog_search_weibo&value=direct_user_icon\"><img usercard=\"id=3921015143&usercardkey=weibo_mpj\" title=\"\u592e\u884c\u5fae\u64ad\" src=\"http:\/\/tp4.sinaimg.cn\/3921015143\/180\/5680795507\/1\" class=\"W_face_radius\"><\/a><\/div>\n\t  \t<!-- \u660e\u661f\u89c2\u5149\u56e2\u6392\u540d -->\n\t  <!--\n\t  \t  -->\n\t  <!-- \u660e\u661f\u89c2\u5149\u56e2\u6392\u540d -->\n\t  \n\t  <div class=\"star_detail\">\n\t <p class=\"star_name\">\n\t  <a class=\"name_txt\" usercard=\"id=3921015143&usercardkey=weibo_mpj\" href=\"http:\/\/weibo.com\/u\/3921015143\" target=\"_blank\" suda-data=\"key=tblog_search_weibo&value=direct_user_name:1_02_3921015143\">\n\t  \u592e\u884c\u5fae\u64ad\n\t  <\/a> \n\t    <a target=\"_blank\" href=\"http:\/\/verified.weibo.com\/verify\" title= \"\u5fae\u535a\u673a\u6784\u8ba4\u8bc1\" alt=\"\u5fae\u535a\u673a\u6784\u8ba4\u8bc1\" class=\"approve_co\"><\/a>\n\t   <a href=\"javascript:void(0);\" action-data=\"type=followed\" wforce=\"0\" uid=\"3921015143\" action-type=\"follow\" class=\"W_btn_b6\" suda-data=\"key=tblog_search_weibo&value=direct_user_follow:1_02_3921015143\"><em class=\"W_ficon ficon_add S_ficon\">+<\/em>\u5173\u6ce8<\/a>\n  \t <\/p>\n\t\t<p class=\"star_card\">\n\t  <span class=\"male m_icon\"><\/span>\n\t  <span>\u5317\u4eac \u897f\u57ce\u533a<\/span>\n\t  <a href=\"http:\/\/weibo.com\/u\/3921015143\" target=\"_blank\" class=\"wb_url\" suda-data=\"key=tblog_search_weibo&value=direct_user_url\">http:\/\/weibo.com\/u\/3921015143<\/a>\n\t  \t  \n\t  \t  <\/p>\n\t <p class=\"person_card\">\u4e2d\u56fd\u4eba\u6c11\u94f6\u884c\u529e\u516c\u5385\u5b98\u65b9\u5fae\u535a<\/p>\t <p class=\"star_num\">\n\t  <span>\u5173\u6ce8<a href=\"http:\/\/weibo.com\/3921015143\/follow\" target=\"_blank\" suda-data=\"key=tblog_search_weibo&value=direct_user_num:1_02_3921015143\">36<\/a><\/span>\n\t  <em class=\"W_vline\">|<\/em>\n\t  <span>\u7c89\u4e1d<a href=\"http:\/\/weibo.com\/3921015143\/fans\" target=\"_blank\" suda-data=\"key=tblog_search_weibo&value=direct_user_num:1_02_3921015143\">305\u4e07<\/a><\/span>\n\t  <em class=\"W_vline\">|<\/em>\n\t  <span>\u5fae\u535a<a href=\"http:\/\/weibo.com\/3921015143\/profile\" target=\"_blank\" suda-data=\"key=tblog_search_weibo&value=direct_user_num:1_02_3921015143\">604<\/a><\/span>\n\t <\/p>\n\t\t<p class=\"person_newwb\">\n\t\t\t<a\n\thref=\"http:\/\/weibo.com\/3921015143\/CrlNChny4\"\n\ttarget=\"_blank\"suda-data=\"key=tblog_search_weibo&value=direct_user_new\">\u6700\u65b0\u5fae\u535a<\/a>\uff1a\n\t\u3010\u4e2d\u8d8a\u91d1\u878d\u4e0e\u8d27\u5e01\u5408\u4f5c\u5de5\u4f5c\u7ec4\u9996\u6b21\u4f1a\u8bae\u5728\u8d8a\u5357\u53ec\u5f00\u30117\u670815\u65e5\uff0c\u4e2d\u8d8a\u91d1\u878d\u4e0e\u8d27\u5e01\u5408\u4f5c\u5de5\u4f5c\u7ec4\u9996\u6b21\u4f1a\u8bae\u5728\u8d8a\u5357\u6cb3\u5185\u53ec\u5f00\u3002\u4e2d\u56fd\u4eba\u6c11\u94f6\u884c\u6613\u7eb2\u526f\u884c\u957f\u548c\u8d8a\u5357\u56fd\u5bb6\u94f6\u884c\u962e\u6c0f\u7ea2\u526f\u884c\u957f\u5171\u540c\u4e3b\u6301\u4f1a\u8bae\u3002\u53cc\u65b9\u4e3b\u8981\u5c31\u4e2d\u8d8a\u4e24\u56fd\u8fd1\u671f\u5b8f\u89c2\u7ecf\u6d4e\u5f62\u52bf\u548c\u8d27\u5e01\u653f\u7b56\u3001\u91d1\u878d\u7a33\u5b9a\u548c\u91d1\u878d\u5e02\u573a\u53d1\u5c55\u3001\u53cc\u8fb9\u8d38\u6613\u4e0e\u6295\u8d44\u4e2d\u7684\u672c\u5e01\u7ed3\u7b97\u7b49\u8bae\u9898\u4ea4\u6362\u4e86\u610f\u89c1\u3002\n\t\t\t<\/p>\n\t\t<\/div>\n\t <\/div>\n\t<\/div>\n<\/div>\n"})</script>
如何把<script>...</scirpt>中的“\u6700\u65b0\u5fae\u535a<\/a>\uff1a\n\t\u3010\u4e2d\u8d8a\u91d1\u878d\u4e0e\u8d27\u5e01\u5408\u4f5c\u5de5\u4f5c\u7ec4\u9996\u6b21\u4f1a\u8bae\u5728\u8d8a\u5357\u53ec\u5f00\u30117\u670815\u65e5\uff0c\u4e2d\u8d8a\u91d1\u878d\u4e0e\u8d27\u5e01\u5408\u4f5c\u5de5\u4f5c\u7ec4\u9996\u6b21\u4f1a\u8bae\u5728\u8d8a\u5357\u6cb3\u5185\u53ec\u5f00\u3002\u4e2d\u56fd\u4eba\u6c11\u94f6\u884c\u6613\u7eb2\u526f\u884c\u957f\u548c\u8d8a\u5357\u56fd\u5bb6\u94f6\u884c\u962e\u6c0f\u7ea2\u526f\u884c\u957f\u5171\u540c\u4e3b\u6301\u4f1a\u8bae\u3002\u53cc\u65b9\u4e3b\u8981\u5c31\u4e2d\u8d8a\u4e24\u56fd\u8fd1\u671f\u5b8f\u89c2\u7ecf\u6d4e\u5f62\u52bf\u548c\u8d27\u5e01\u653f\u7b56\u3001\u91d1\u878d\u7a33\u5b9a\u548c\u91d1\u878d\u5e02\u573a\u53d1\u5c55\u3001\u53cc\u8fb9\u8d38\u6613\u4e0e\u6295\u8d44\u4e2d\u7684\u672c\u5e01\u7ed3\u7b97\u7b49\u8bae\u9898\u4ea4\u6362\u4e86\u610f\u89c1\u3002”转为汉字

解决方案 »

  1.   

    @ksrsoft 你好,能否告诉用delphi7 如何转?
      

  2.   

    给个GET URL来试试,貌似是Unicode
      

  3.   

    http://s.weibo.com/weibo/%25E5%25A4%25AE%25E8%25A1%258C?topnav=1&wvr=6&topsug=1 就这个url下来的代码 @qq_29121853
      

  4.   

    是unicode的编码,就是不知如何转成汉字
      

  5.   

    我有c++的版本
    delphi的参考网上的例子
    http://www.douban.com/note/61933841/?type=like
    http://www.360doc.com/content/12/1219/23/9200790_255194481.shtml
      

  6.   

    网上找的函数,自己试一下。function UnicodeToAnsi(aSubUnicode: string):string;
    var tmpLen,iCount:Integer;
        tmpWS:WideString;
    begin
      tmpWS:='';
      iCount:=1;
      tmpLen:=Length(aSubUnicode);
      while iCount<=tmpLen do
        try
          if (Copy(aSubUnicode, iCount, 1)='\')and (Copy(aSubUnicode, iCount, 2)='\u') then begin
            tmpWS:=tmpWS+WideChar(StrToInt('$'+Copy(aSubUnicode,iCount+2,4)));
            iCount:=iCount+6;
          end
          else begin
            tmpWS:=tmpWS+Copy(aSubUnicode,iCount,1);
            iCount:=iCount+1;
          end;
        except
        end;
      Result:=tmpWS;
    end;procedure TForm1.Button1Click(Sender: TObject);
    begin
      showmessage(UnicodeToAnsi('\u65b0\u6d6a\u4f53\u80b2'));//显示“新浪体育”
    end;