NAME
CURLOPT_CONV_FROM_UTF8_FUNCTION - convert data from UTF8 to host encodingSYNOPSIS
#include <curl/curl.h> CURLcode conv_callback(char *ptr, size_t length); CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CONV_FROM_UTF8_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
TLS-based protocols.EXAMPLE
static CURLcode my_conv_from_utf8_to_ebcdic(char *buffer, size_t length) { char *tempptrin, *tempptrout; size_t bytes = length; int rc; tempptrin = tempptrout = buffer; rc = platform_u2e(&tempptrin, &bytes, &tempptrout, &bytes); if(rc == PLATFORM_CONV_OK) { return CURLE_OK; } else { return CURLE_CONV_FAILED; } } curl_easy_setopt(curl, CURLOPT_CONV_FROM_UTF8_FUNCTION, my_conv_from_utf8_to_ebcdic);
AVAILABILITY
Not available and deprecated since 7.82.0.RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.SEE ALSO
CURLOPT_CONV_TO_NETWORK_FUNCTION(3), CURLOPT_CONV_FROM_NETWORK_FUNCTION(3),January 2, 2023 | libcurl 7.88.1 |