Пример #1
0
    public override void Write(byte[] buffer, int offset, int count)
    {
        byte[] data = new byte[count];

        TransforCodePage tfcp = new TransforCodePage();

        // 取得網頁資料
        System.Buffer.BlockCopy(buffer, offset, data, 0, count);
        string in_data = Encoding.UTF8.GetString(data).ToString();

        // 轉成繁體文字
        in_data = tfcp.toBig5(in_data);
        data = Encoding.UTF8.GetBytes(in_data);

        // 存回網頁資料
        strSink.Write(data, 0, count);
    }
Пример #2
0
 protected void bn_tobig5_Click(object sender, EventArgs e)
 {
     TransforCodePage tfc = new TransforCodePage();
     tb_big5.Text = tfc.toBig5(tb_gb.Text);
 }