public override void Write(byte[] buffer, int offset, int count) { byte[] data = new byte[count]; string in_data = ""; TransforCodePage tfcp = new TransforCodePage(); // 取得網頁資料 System.Buffer.BlockCopy(buffer, offset, data, 0, count); in_data = Encoding.UTF8.GetString(data).ToString(); // 轉換成簡體文字 in_data = tfcp.toGB(in_data); data = Encoding.UTF8.GetBytes(in_data); // 存回網頁資料 strSink.Write(data, 0, count); }
protected void bn_togb_Click(object sender, EventArgs e) { TransforCodePage tfc = new TransforCodePage(); tb_gb.Text = tfc.toGB(tb_big5.Text); }