diff options
-rw-r--r-- | lib/easy.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/easy.c b/lib/easy.c index 37c0c9a01..0d648064d 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -613,9 +613,12 @@ CURL *curl_easy_duphandle(CURL *incurl) #endif #if defined(CURL_DOES_CONVERSIONS) && defined(HAVE_ICONV) - outcurl->outbound_cd = data->outbound_cd; - outcurl->inbound_cd = data->inbound_cd; - outcurl->utf8_cd = data->utf8_cd; + outcurl->inbound_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST, + CURL_ICONV_CODESET_OF_NETWORK); + outcurl->outbound_cd = iconv_open(CURL_ICONV_CODESET_OF_NETWORK, + CURL_ICONV_CODESET_OF_HOST); + outcurl->utf8_cd = iconv_open(CURL_ICONV_CODESET_OF_HOST, + CURL_ICONV_CODESET_FOR_UTF8); #endif Curl_easy_initHandleData(outcurl); |