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
12       text);
13

DESCRIPTION

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

DEFAULT

27       0, disabled
28

PROTOCOLS

30       FTP
31

EXAMPLE

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

AVAILABILITY

42       Along with FTP
43

RETURN VALUE

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

SEE ALSO

48       CURLOPT_CRLF(3),
49
50
51
52libcurl 7.69.1                   May 31, 2017          CURLOPT_TRANSFERTEXT(3)
Impressum