03 2013 档案
摘要:大家都知道PostMessage会丢消息,但是消息队列的大小是多少呢,下面做了一个测试。代码: 1 unit Unit1; 2 3 interface 4 5 uses 6 Windows, Messages, SysUtils, Variants, Classes, Graphics...
阅读全文
摘要:使用Delphi对Json中的Unicode字符串进行解析:[{"name":"\u97e9\u56fd\u9996\u5c14KT\u670d\u52a1\u5668","ip":"211.115.67.40"},{"name":"\u97e9\u56fd\u5357\u90e8","ip":"211.115.67.40"}]function TForm1.DecodeUnicodeString(const S: string): s
阅读全文
摘要:Delphi6下使用Indy10组件包,其中的TIdHttpServer控件在处理HTTP请求的时候不能正确解码含有汉字的参数,如:http://127.0.0.1/test?cmd=open&areaname=测试&areadir=D:\test对于这个Url,Chrome默认按UTF-8编码发送,IE默认按GBK编码发送,而这两种情况,TIdHttpServer的CommandGet事件中TIdHTTPRequestInfo.Params.Values['areaname']返回的均为乱码。用POST方式测试,也存在同样的问题。经过分析Indy的源码,发现主
阅读全文

浙公网安备 33010602011771号