Haxx ad

curl's project page on


cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

How to get HTTP charset? I wanna do charset conversion(or maybe libcurl already has this feature)

From: kartwall <>
Date: Thu, 10 Jun 2010 15:53:11 +0800 (CST)

Hi, curl-library:
    I am new to libcurl. I have tried to write some programs based on libcurl easy interfaces, it works and it's cool. :) But currently I have a question here:
    I wanna convert all http responses to UTF-8 because, you know, not all web pages are written in UTF-8. I skimmed the manual of "curl_easy_setopt", seems "CURLOPT_CONV_TO_NETWORK_FUNCTION", "CURLOPT_CONV_FROM_NETWORK_FUNCTION" do helps. But here is a big question: How can I know the charset of html file which I received? My understanding is, first I should know the charset of html I received, then I can start converting this html into UTF-8.
    So, any suggestions? Thanks for any comments.
Eric Zhang

List admin:
Received on 2010-06-10

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET