Delphi2009环境下:C: TIdUDPClient;
S: TIdUDPServer;发送消息:
C.Send(edit1.Text);接收消息:
procedure TForm1.SUDPRead(AThread: TIdUDPListenerThread; AData: TBytes;
ABinding: TIdSocketHandle);
var ss:string;
begin
ss:=BytesToString(Adata,0,-1,en8Bit);
showmessage(ss);
end;程序正常
但如果我要发的消息是中文该如何做?
需要转码么?该如何转?
谢谢,请帖出代码,
提醒 是delphi2009
S: TIdUDPServer;发送消息:
C.Send(edit1.Text);接收消息:
procedure TForm1.SUDPRead(AThread: TIdUDPListenerThread; AData: TBytes;
ABinding: TIdSocketHandle);
var ss:string;
begin
ss:=BytesToString(Adata,0,-1,en8Bit);
showmessage(ss);
end;程序正常
但如果我要发的消息是中文该如何做?
需要转码么?该如何转?
谢谢,请帖出代码,
提醒 是delphi2009
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货