码迷,mamicode.com
首页 > Windows程序 > 详细

Delphi XE8 中TIdTCPClient的WriteLn编码变化!

时间:2016-11-24 06:18:18      阅读:341      评论:0      收藏:0      [点我收藏+]

标签:dtc   class   and   global   handler   text   delphi   hand   tcp   

XE2中正常的代码:

IdTCPClient1.IOHandler.WriteLn(sendData,TEncoding.ANSI);  

XE8中不行了,解决方法:

 1,引入“IdGlobal ”单元。

2,调整代码:通过IndyTextEncoding() 方法,把TEncoding转换为IIdTextEncoding。

Delphi XE8 中TIdTCPClient的WriteLn编码变化!

标签:dtc   class   and   global   handler   text   delphi   hand   tcp   

原文地址:http://www.cnblogs.com/sunylat/p/6095567.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!