Sortix cross-volatile manual
This manual documents Sortix cross-volatile. You can instead view this document in the latest official manual.
CURLOPT_CONV_FROM_NETWORK_FUNCTION(3) | Library Functions Manual | CURLOPT_CONV_FROM_NETWORK_FUNCTION(3) |
NAME
CURLOPT_CONV_FROM_NETWORK_FUNCTION - convert data from network to host encodingSYNOPSIS
#include <curl/curl.h>
CURLcode conv_callback(char *ptr, size_t length);
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONV_FROM_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_ascii_to_ebcdic(char *buffer, size_t length)
{
int rc = 0;
/* in-place convert 'buffer' from ASCII to EBCDIC */
if(rc == 0) {
/* success */
return CURLE_OK;
}
else {
return CURLE_CONV_FAILED;
}
}
int main(void)
{
CURL *curl = curl_easy_init();
/* use platform-specific functions for codeset conversions */
curl_easy_setopt(curl, CURLOPT_CONV_FROM_NETWORK_FUNCTION,
my_conv_from_ascii_to_ebcdic);
}
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_UTF8_FUNCTION(3), CURLOPT_CONV_TO_NETWORK_FUNCTION(3)2024-12-28 | libcurl |