How to grab web page in chinese

类别:.NET开发 点击:0 评论:0 推荐:
try { //get date from web url // Create a new WebClient instance. WebClient myWebClient = new WebClient(); // Download the Web resource and save it into a data buffer. byte[] myDataBuffer = myWebClient.DownloadData (this.textBox2.Text); // Display the downloaded data. //string download = System.Text.Encoding.ASCII.GetString(myDataBuffer); string download = System.Text.Encoding.GetEncoding("GB2312").GetString(myDataBuffer); richTextBox1.Text=download; } catch(Exception _e) { MessageBox.Show(_e.Message); }