CURL.SetOptionTransferText
--------------------------

Whether to use ASCII mode for FTP transfer.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [2.5](newinversion25.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "CURL.SetOptionTransferText"; curl; Value ) 

**MBS**( **"CURL.SetOptionTransferText";** /\* Whether to use ASCII mode for FTP transfer. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**) /\* Whether to use ASCII mode.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Value | Whether to use ASCII mode. | 1 |

### Result

Returns "OK" on success.

### Description

Whether to use ASCII mode for FTP transfer.  
A parameter set to 1 tells the library to use ASCII mode for FTP transfers, instead of the default binary transfer. For win32 systems it does not set the stdout to binary mode. This option can be usable when transferring text data between systems with different views on certain characters, such as newlines or similar.  
  
libcurl does not do a complete ASCII conversion when doing ASCII transfers over FTP. This is a known limitation/flaw that nobody has rectified. libcurl simply sets the mode to ASCII and performs a standard transfer.  
See also [TRANSFERTEXT](https://curl.haxx.se/libcurl/c/CURLOPT_TRANSFERTEXT.html) option in CURL manual.

### Examples

Set transfer mode to binary data:

 MBS ( "CURL.SetOptionTransferText"; $curl ; 0 )  
Set transfer mode to text:

 MBS ( "CURL.SetOptionTransferText"; $curl ; 1 )  
### See also

- [CURL.Perform](CURLPerform.md)
- [CURL.SetOptionIssuerCert](CURLSetOptionIssuerCert.md)
- [CURL.SetOptionProxyTransferMode](CURLSetOptionProxyTransferMode.md)

### Blog Entries

- [Translating Insert from URL options for CURL to MBS Plugin calls](https://www.mbsplugins.de/archive/2020-12-14/Translating_Insert_from_URL_op/monkeybreadsoftware_blog_filemaker)

Created 18th August 2014 , last changed 7th December 2016

  
[CURL.SetOptionTransferEncoding](CURLSetOptionTransferEncoding.md) - [CURL.SetOptionURL](CURLSetOptionURL.md)

[HTML Version](CURLSetOptionTransferText.shtml)