1CURLOPT_TRANSFERTEXT(3)    curl_easy_setopt options    CURLOPT_TRANSFERTEXT(3)
2
3
4

NAME

6       CURLOPT_TRANSFERTEXT - request a text based transfer for FTP
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_TRANSFERTEXT, long text);
12

DESCRIPTION

14       A parameter set to 1 tells the library to use ASCII mode for FTP trans‐
15       fers, instead of the default binary transfer. For win32 systems it does
16       not  set  the  stdout  to  binary  mode. This option can be usable when
17       transferring text data between systems with different views on  certain
18       characters, such as newlines or similar.
19
20       libcurl does not do a complete ASCII conversion when doing ASCII trans‐
21       fers over FTP. This is a known limitation/flaw that nobody  has  recti‐
22       fied.  libcurl  simply  sets  the mode to ASCII and performs a standard
23       transfer.
24

DEFAULT

26       0, disabled
27

PROTOCOLS

29       FTP
30

EXAMPLE

32       CURL *curl = curl_easy_init();
33       if(curl) {
34         curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/textfile");
35         curl_easy_setopt(curl, CURLOPT_TRANSFERTEXT, 1L);
36         ret = curl_easy_perform(curl);
37         curl_easy_cleanup(curl);
38       }
39

AVAILABILITY

41       Along with FTP
42

RETURN VALUE

44       Returns CURLE_OK if FTP is supported, and CURLE_UNKNOWN_OPTION if not.
45

SEE ALSO

47       CURLOPT_CRLF(3),
48
49
50
51libcurl 8.0.1                  January 02, 2023        CURLOPT_TRANSFERTEXT(3)
Impressum