delphi 7 获取当前网址并解决乱码问题

 

const Url = ‘http://del.cnblogs.com‘;

procedure Tidhttptestform.Button1Click(Sender: TObject);
var
stream:TStringStream;
idHttpObj:TIdHTTP;
begin
stream := TStringStream.Create(‘‘);

idHttpObj := TIdHTTP.Create(nil);
idHttpObj.Get(Url, stream);

idHttpObj.Free;
//乱码转化
//Memo1.Lines.Text := UTF8Decode(stream.DataString);
ShowMessage(UTF8Decode(stream.DataString));
stream.Free;
end;

delphi 7 获取当前网址并解决乱码问题

上一篇:window下查看端口占用情况


下一篇:node API buffer