I would like to open a web site and read source of that. so I wrote this code:
WebClient client = new WebClient();
htmlCode = client.DownloadString("http://www.varzesh3.com");
but I got a garbage data. I also add this codes but still it does not work.
client.Encoding = Encoding.UTF8; client.Headers.Add("charset", "utf-8");
In addition, I use this codes but none of them did not work:
byte[] raw = client.DownloadData("http://www.varzesh3.com");
string webData1 = Encoding.ASCII.GetString(raw);
string webData2 = Encoding.BigEndianUnicode.GetString(raw);
string webData3 = Encoding.Unicode.GetString(raw);
string webData4 = Encoding.UTF32.GetString(raw);
string webData5 = Encoding.UTF7.GetString(raw);
string webData6 = Encoding.UTF8.GetString(raw);
note: I can open and read any other website which uses persian(farsi) language but I could not open www.varzesh3.com could you please help me ?