Although most of the Chinese have to work out, but there are several gibberish,
How to change 54936 to 65001, will complete the UTF8 displayed
But I don't think in this way, go directly and other way can not appear small garbled??
IdHTTP1:=TIdHTTP. Create;
Ss:=TStringStream. Create (' ', TEncoding. GetEncoding (54936));//by default gb18030
Idhttp1. Get (' www.jobui.com ', ss);//arbitrary UTF8 sites are so
Memo1. Text:=LowerCase (ss) DataString);//turn out unified all lowercase characters
Memo2. Text:=utf8toAnsi (Memo1. Text);
CodePudding user response:
IdHTTP1:=TIdHTTP. Create;
Try
Memo1. Text:=Utf8ToAnsi (IdHTTP1. Get (' http://www.jobui.com '));
The finally
IdHTTP1. Free;
end;
So did not find the code,
CodePudding user response: