delphi调用c#写的webservice中文出现乱码的问题
生活随笔
收集整理的這篇文章主要介紹了
delphi调用c#写的webservice中文出现乱码的问题
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
解決方法:HTTPRIO1的屬性---HttpWebNode--UseUtf8InHeader設(shè)置為true
代碼片斷:
function TLoginManager.Get_LoginManagerSoap: ILoginManagerSoap;
const
? defSvc='LoginManager';
? defPrt='LoginManagerSoap';
var
? RIO: THTTPRIO;
begin
? Result:= nil;
? RIO:= THTTPRIO.Create(nil);
? try
??? Result:=(RIO as ILoginManagerSoap);
??? RIO.WSDLLocation := SemsClientApp.Config.Server.URL+'/WebService/LoginManager.asmx?wsdl';
??? RIO.Service:=defSvc;
??? RIO.Port:=defPrt;
??? RIO.HTTPWebNode.UseUTF8InHeader:=True;
? finally
??? if (Result=nil) then RIO.Free;
? end;
end;
總結(jié)
以上是生活随笔為你收集整理的delphi调用c#写的webservice中文出现乱码的问题的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: (原創) 鐵拳4真是超級好玩~~ (日記
- 下一篇: 用JS实现人脑和计算机交互,这个厉害了