1,593
社区成员
发帖
与我相关
我的任务
分享
memo1.Text := Utf8ToAnsi( idhttp1.get('url') );
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='
)