Skip to content
Mercury13 edited this page Apr 6, 2015 · 9 revisions

Warning: current version of Windows libcurl does not support Unicode! URLs and data — this is unpleasant, but you can encode/decode them for yourself. The main problem lies in file names.

So curl4delphi contains some emulation layer to circumvent this dire fact.

What does it mean?

  1. ICurlForm that involves disk files keeps them open all the time.
  2. If the form involves any stream (including file streams), ICurl.Clone renders the clone thread-unsafe. You should recreate the form. To check whether you should recreate it, use Assigned(ICurl.Form.ReadFunction).

OpenSSL

Fortunately, OpenSSL supports Unicode. CURLOPT_CAINFO just accepts file name in UTF-8, that’s all. ICurl.SetCaFile just encodes the filename into UTF-8 and passes it to cURL.

Clone this wiki locally