cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: enconding of strings passed to libCURL functions

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 20 Apr 2007 10:39:43 -0700

On Fri, Apr 20, 2007 at 05:27:13PM +0200, Francesco Montorsi wrote:
> Hi all,
> sorry for the dumb question but I've searched this info in the docs
> without success.
>
> Which should be the encoding of the strings I pass e.g. to
> curl_easy_setopt ?
>
> UTF8, plain ASCII, UTF7?

The answer is: it depends. For options like CURLOPT_URL, you need to
consult something like RFC3896 (URL syntax). For CURLOPT_NETRC_FILE, it
depends on what your filesystem uses and what the C API to access the
filesystem expects. For CURLOPT_USERPWD, you need to consult RFC2616
(HTTP) or another RFC depending on the authentication system in use.
For CURLOPT_POSTFIELDS it depends on the remote web app.
And all the above is dependent on whether CURL_DOES_CONVERSIONS was
enabled during compilation. So none of these can therefore really be
accurately documented in the libcurl documentation.

Luckily, it usually pretty obvious from the context what each option needs.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2007-04-20