小弟我用IDHTTP的get和post接收到的数据如何解码啊

我用IDHTTP的get和post接收到的数据怎么解码啊。。
有的时候直接就能看到正确的内容,有的时候需要加UTF8TOANSI解码,但其它类型的我都不会解啊。例如GB2312,unicode等。
希望大侠们帮帮忙啊。有没有直接的解码函数或负责解码的组件或类啊。。我的代码如下:
  gethttp:=tidhttp.Create(nil);
  response:=tstringstream.Create('');
  gethttp.HTTPOptions:=idhttp1.HTTPOptions+[hoKeepOrigProtocol];//关键这行
  gethttp.ProtocolVersion:=pv1_1;
  gethttp.Request.AcceptLanguage := 'zh-cn';
  gethttp.Request.UserAgent :='Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Maxthon; InfoPath.2)';
  gethttp.Request.Connection:='Keep-Alive';
  gethttp.Request.Referer:=refer;
  gethttp.Host:=host;
  gethttp.Request.Accept :=accept;
  gethttp.Request.AcceptEncoding:='gzip, deflate';
  gethttp.Request.ContentType:='application/x-www-form-urlencoded';
  gethttp.Request.SetHeaders;
  gethttp.request.customheaders.add('x-flash-version:'+' 11,0,1,152');
  gethttp.Request.CustomHeaders.Add('cookie: '+cookie);
  try
  gethttp.Get(url,response);
  result:=cookiewrite(gethttp.Response.RawHeaders);//自定义的通用函数
  memo1.Lines.Add(response.datastring);//如数据为UTF8则memo1.Lines.Add(utf8toansi(response.datastring));
  finally
  gethttp.Free;
  response.Free;
  end;

------解决方案--------------------
Delphi(Pascal) code

//------ IDHTTP GET网页通用函数
function TForm1.IdHTTPGet(aURL: string; var sWeb: string): Boolean;
var
  IdHTTP: TIdHTTP;
  SS_Response: TStringStream; // 提交后返回的数据
begin
  Result := False;
  if aURL = '' then Exit;
  sWeb := '';
  IdHTTP := TIdHTTP.Create(nil);
  try
    try
      with IdHTTP do
      begin
        // IdHTTP 设置
        HTTPOptions := HTTPOptions + [hoKeepOrigProtocol];   //保持 并使用PV1_1
        ProtocolVersion := pv1_1;
        HTTPOptions := HTTPOptions - [hoForceEncodeParams];  //去掉自动编码
        AllowCookies := True;
        HandleRedirects := True;
        ConnectTimeout := 30000;
        ReadTimeout := 30000;
        // IdHTTP 提交信息的设置
        Request.Accept := 'application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5';
        Request.AcceptCharSet := 'GBK,utf-8;q=0.7,*;q=0.3';
        Request.AcceptEncoding := '';     //'gzip,deflate,sdch';
        Request.AcceptLanguage := 'zh-CN,zh;q=0.8';
        Request.Connection :='Keep-Alive';
        Request.ContentType := 'application/x-www-form-urlencoded';
        Request.UserAgent := 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16';
        Request.Referer := aURL;

        SS_Response := TStringStream.Create('', TEncoding.GetEncoding(936)); //或者TEncoding.UTF8 
        try
          Get(aURL, SS_Response);
          if ResponseCode <> 200 then Exit;
          if SS_Response.Size <= 1 then Exit;
          sWeb := SS_Response.DataString;
          Result := True;
        finally
          FreeAndNil(SS_Response);
        end;
      end;
    except
      on E: Exception do
        Result := False;
    end;
  finally
    IdHTTP.Disconnect;
    FreeAndNil(IdHTTP);
  end;
end;

------解决方案--------------------
探讨
%E6%82%A8%E8%BF%98%E6%这种编码用utf8decode(httpdecode(recivedata.response))解码出来了,\u60a8\u7684\u9a8c\u8bc1这样的的编码还是解不出来。。
SS_Response := TStringStream.Create('', TEncoding.GetEncoding(936))不是DELPHI7的函数吧,,我创……