|
|
How to grab web page in chinese |
|
|
作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站 |
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);
}
|
|
相关文章:相关软件: |
|