CodePudding user response:
How do you write under xe8 codeCodePudding user response:
Try the UT8Decode decoding?CodePudding user response:
Used UTF8Decode, UTF8ToAnsi andCodePudding user response:
T:=TStringStream. Create (' ', tencoding UTF8);
Idhttp1. Post (SvrUrl + postUrl, ts, t);
Result:=Utf8ToAnsi (t.D ataString); Or the Result:=Utf8Decode (t.D ataString);
Or
T:=TStringStream. Create (' ', tencoding. ANSI);
Idhttp1. Post (SvrUrl + postUrl, ts, t);
Result:=t.D ataString;
Not all,
To determine the site returns the UTF8, also use IDHttp under Delphi7 returns is normal
CodePudding user response:
Can you send up the urlCodePudding user response:
http://app.25hours.cc:6077/webservice/25hours.asmx/StruUpPost:data=https://bbs.csdn.net/topics/{" ShopID ": 1," SyncVer ": 200}
My own server
CodePudding user response:
procedure TForm1. Button1Click (Sender: TObject);
Var
T: TStringStream;
Ts: TStringList;
SvrUrl postUrl: string;
The begin
SvrUrl:='http://app.25hours.cc:6077/webservice/25hours.asmx/StruUp';
PostUrl:=';
Ts:=TStringList. Create;
Ts. Text:='data=https://bbs.csdn.net/topics/{" ShopID ": 1," SyncVer ": 200}';
T:=TStringStream. Create (' ', tencoding UTF8);
IdHTTP1. Post (SvrUrl + postUrl, ts, T);
Memo1. Text:=T.D ataString;
end;
After the test, there is no garbled
{" error ": 0," MSG ":" table structure upgrade success!" , 247, "Count" : "Stru" : [{" ID ": 201," SqlStr ":" the CASE "}, {" ID ", 202, "...
CodePudding user response:
Reference:IdURI;
Use:
TidURI. URLDecode (MyHttp. Get (TidURI URLEncode (uploadstr)));
CodePudding user response:
According to the 7 floor, there is no garbled words, the problem may be on your operating system, please change to computer, or try to reinstall system,CodePudding user response:
Don't outside the failures of Chinese character input method, also can appear similar problems,CodePudding user response:
According to the 7th floor that could it be that the building Lord XE8 project Settings have what you need to change? I also encountered the same problem of the great god, please answer the other the building Lord what progress?CodePudding user response:
Find a solution, use tstringstream as the return type, part of the code reference:responsejson: tstringstream;
Responsejson:=tstringstream. Create (', 65001);
HTTP post (URL, StringList, responsejson);
Memo1. Lines. The Add (responsejson DataString);
The inside of the responsejson. DataString Chinese not garbled!
Reference solution from http://blog.sina.com.cn/s/blog_549f50ec01019cgc.html,
CodePudding user response:
The