2012/09/25

Indy10 IdHTTP對非英文語的處理方式(泛中文處理)

這陣子想從網路上下載一些文件,URL大致上像下面這句:

「sUrl := http://www.DelphiCpp.com/我愛Delphi.txt」

使用 IdHTTP.Get(sUrl, ms) 方法卻怎麼也抓不到,可是也沒有Exception…

李組長眉頭一皺,發現案情並不單純。

於是請了Google大神拜了一下,也發現不少災情。

请问Delphi7怎么解决Indy发送中文字符的问题
Thread: IdHTTP and æøå ??

發現共通點都是靠「TIdTextEncoding」來解決問題
所以原先的作法就修改成這樣:

新書推薦 - Delphi XE2 Foundations (Delphi XE2 基礎)

以下是原文介紹
======================
Provides a comprehensive guide to the language and core non-visual libraries of Embarcadero Delphi XE2,
from basic language syntax to multithreading.

Adopting an integrated approach, the book covers both newer and older features alongside one another;
while it won't teach you how to program, it assumes little Delphi knowledge specifically.

Includes coverage of XE2's support for Mac OS X.

(Edition note: the printed version combines the three parts of the eBook version, which is available separately.)

如果手上有Kindle的人也可以考慮買Kindle Edition

不知道怎麼買的人也可以到這裡購買

天瓏

Amazon Delphi XE2 Foundations part1 for Kindle Edition