问题如上,请问有什么解决的办法吗?
delphi版本7.0,自带INDY控件。//-------------------------------------------------------------
在网页地址栏中输入:http://p1.930t.com/FindLRC.asp?LRCFile=倩女幽魂 - 张国荣.lrc可以产生结果
但使用下面代码就不行了~
不过当参数中没有中文的时候又可以了。procedure TForm1.Button1Click(Sender: TObject);
var
  GetURL : wideString;
  Temp : String;
begin
  GetURL := 'http://p1.930t.com/FindLRC.asp?LRCFile=倩女幽魂 - 张国荣.lrc';
  //GetURL := 'http://p1.930t.com/FindLRC.asp?LRCFile=abc.lrc';
  try
    Temp  := IdHTTP1.get(GetURL);//获取LRC 文件-------
    Memo1.Lines.Add(Temp)
  except
    ShowMessage('not get File.....');
  end;
end;  

解决方案 »

  1.   

    用Post试试,中文好像是要编码的吧。
      

  2.   

    GetURL := IdHTTP1.URL.URLEncode('http://p1.930t.com/FindLRC.asp?LRCFile=倩女幽魂 - 张国荣.lrc');
    这样就可以了~~~~~*(n_n)*
      

  3.   

    提示: 'HTTP/1.1 404 not Found'.
      

  4.   

    uses httpapp;GetURL := httpencode('http://p1.930t.com/FindLRC.asp?LRCFile=倩女幽魂 - 张国荣.lrc');
      

  5.   

    同样提示'HTTP/1.1 404 not Found'.
    这是为什么啊 ,
      

  6.   

    IdHTTP1.Request.ContentType := 'application/x-www-form-urlencoded';
      

  7.   

    应当是对参数值编码,而不是对整个URL编码吧?GetURL :='http://p1.930t.com/FindLRC.asp?LRCFile=' + httpencode('倩女幽魂 - 张国荣.lrc');
    试试呢。