idhttp.get中文乱码解决方法

idhttp.get中文乱码
UTF8Decode(IdHTTP1.Get(
'&un='    
'&pwd='   
'&Cnt='   //主要是这里为中文
'&Mobiles=
'&IsSign='
'&Schdate=
'&Schtime=
'&IsLong='

等等之类的参数

提交的英文参数没有问题

但提交中文字符的时候,在服务器上查看显示的是[??????]

是怎么回事,应该如何解决


------解决方案--------------------
用wpe看看http访问时的head信息,然后根据那个新,去填写idhttp的发送信息
------解决方案--------------------
看你http服务器怎么解析。。像百度是转成编码字符串发。。就是那种一个汉字转成类似%23%43那种码。。
POST和GET都会发送。。对于你的问题要点来说并没本质区别。。。
------解决方案--------------------

function EnCodeUtf8URLStr(sUtf8Str:string; sSplit:string='%'):string;
var
  I, iLen:Integer;
  sText: PChar;
  sTmp: string;
begin
  Result := '';     
  iLen := Length(sUtf8Str);
  sText := AllocMem(iLen*2+1);
  BinToHex(PChar(sUtf8Str), sText, iLen);
  sTmp := string(sText);
  FreeMem(sText);
  if sSplit='' then
  begin
    Result := sTmp;
  end
  else
  begin
    iLen := Length(sTmp);
    for I:=1 to iLen do
    begin
      if ((I-1) mod 2) = 0 then
        Result := Result+sSplit;
      Result := Result + sTmp[I];
    end;
  end;
end;


..........................
....试试吧。。这是我之前用的。。试看看。。
主要意思就是这个。。具体编码再看看要不要修改

sTmp:=EnCodeUtf8URLStr(Utf8Encode(sTmp));

UTF8Decode(IdHTTP1.Get(
'&un='   
'&pwd='   
'&Cnt='+sTmp+ 
'&Mobiles=
'&IsSign='
'&Schdate=
'&Schtime=
'&IsLong='




------解决方案--------------------
引用:
引用:
Delphi(Pascal) code

function EnCodeUtf8URLStr(sUtf8Str:string; sSplit:string='%'):string;
var
I, iLen:Integer;
sText: PChar;
sTmp: string;
begin
Result := '';
iLen := L……


好像是因为URL编码限制。。
例如在URL里传入空格是不允许的。。必须用%20代替。
一个汉字UTF8后2字节也需要用类似%11%22这样表示。。百分号是一个标识
------解决方案--------------------
这个是URL参数用现成的URLEncode就行了