System.Text.Encoding (Chinese Character BIG5-->GB Conversion)

N

norton

Dear All,

May i know how can i make a conversion between BIG5 and GB encoding?

Thx in advance!
 
J

John Smith

namespace:
System.Text.Encoding

description:
BIG5 -> Unicode -> GB2312

step details:
1. MyUnicodeString =
System.Text.Encoding.GetEncoding("BIG5").GetString(My_BIG5_ByteArray)

2. My_GB2312_ByteArray =
System.Text.Encoding.GetEncoding("GB2312").GetBytes(MyUnicodeString)

In the only one text I found in MSDN they state that some encodings are
not supported by some systems, so I don't know if "BIG5" and "GB2312"
will work in your computer.

If you just wish to translate traditional chars to simplified:
MySimplifiedUnicodeString =
StrConv(MyTraditionalUnicodeString,VbStrConv.SimplifiedChinese)
 
N

norton

Thx John, it works and that's great!


John Smith said:
namespace:
System.Text.Encoding

description:
BIG5 -> Unicode -> GB2312

step details:
1. MyUnicodeString =
System.Text.Encoding.GetEncoding("BIG5").GetString(My_BIG5_ByteArray)

2. My_GB2312_ByteArray =
System.Text.Encoding.GetEncoding("GB2312").GetBytes(MyUnicodeString)

In the only one text I found in MSDN they state that some encodings are
not supported by some systems, so I don't know if "BIG5" and "GB2312"
will work in your computer.

If you just wish to translate traditional chars to simplified:
MySimplifiedUnicodeString =
StrConv(MyTraditionalUnicodeString,VbStrConv.SimplifiedChinese)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top