Must refer to the system.text namespace
Convert GB2312 to BIG5 encoding
code show as below:
private void button1_Click (object sender, System.EventArgs e) {byte [] temp; // convert the byte array textBox1.Text temp = Encoding.Default.GetBytes (textBox1.Text); // Convert method using the Encoding class, Conversion of TEMP is converted from GB2312 to BIG5 encoded Temp = Encoding.convert (Encoding.Getencoding ("GB2312"), Encoding.Getencoding ("BIG5"), TEMP); // Convert ByTE array to string textBox2.text = Encoding .Default.getstring (TEMP);
Transfer from: http://blog.9cbs.net/ruixing123/Archive/2005/04/08/339788.aspx