Why does HttpWebResponse.CharacterSet always return ISO-8859-1? I am
accessing a Chinese Web site (http://cn.yahoo.com) -- View Source in IE shows
the character set to be "gb2312", but the HttpWebResponse shows it to be
ISO-8859-1. Websites like www.cnn.com also show the character set to
ISO-8859-1
Here is the code snippet:
string pageAddress = "http://cn.yahoo.com";
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(pageAddress);
HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
Console.WriteLine(resp.CharacterSet);