Sortix volatile manual
This manual documents Sortix volatile, a development build that has not been officially released. You can instead view this document in the latest official manual.
CURLOPT_CONV_TO_NETWORK_FUNCTION(3) | Library Functions Manual | CURLOPT_CONV_TO_NETWORK_FUNCTION(3) |
NAME
CURLOPT_CONV_TO_NETWORK_FUNCTION - convert data to network from host encodingSYNOPSIS
#include <curl/curl.h>
CURLcode conv_callback(char *ptr, size_t length);
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONV_TO_NETWORK_FUNCTION,
conv_callback);
DESCRIPTION
Pass a pointer to your callback function, which should match the prototype shown above.define CURL_ICONV_CODESET_OF_HOST "IBM-1047"
#define CURL_ICONV_CODESET_OF_NETWORK "ISO8859-1"
#define CURL_ICONV_CODESET_FOR_UTF8 "UTF-8"
DEFAULT
NULLPROTOCOLS
This functionality affects all supported protocolsEXAMPLE
static CURLcode my_conv_from_ebcdic_to_ascii(char *buffer, size_t length)
{
int rc = 0;
/* in-place convert 'buffer' from EBCDIC to ASCII */
if(rc == 0) {
/* success */
return CURLE_OK;
}
else {
return CURLE_CONV_FAILED;
}
}
int main(void)
{
CURL *curl = curl_easy_init();
curl_easy_setopt(curl, CURLOPT_CONV_TO_NETWORK_FUNCTION,
my_conv_from_ebcdic_to_ascii);
}
DEPRECATED
Not available and deprecated since 7.82.0.AVAILABILITY
Added in curl 7.15.4RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.SEE ALSO
CURLOPT_CONV_FROM_NETWORK_FUNCTION(3), CURLOPT_CONV_FROM_UTF8_FUNCTION(3)2024-11-23 | libcurl |