Problem With Read BIG5 character!

anthor

Member
Joined
Jul 12, 2008
Messages
20
Programming Experience
Beginner
i can't read BIG5 Character ..example
鬼 = B0 AD
but i can't read the BO AD Become 鬼...

some one please help me !!
 
er...it is seem like not same dude...

Dim bytes As String = ansi.GetString("B0AD")?is this correct?
because 4 byte only for 1 character...
 
浪漫二天 = AE F6 BA A9 A4 47 A4 D1
i need convert AE F6 BA A9 A4 47 A4 D1 to 浪漫二天,every 2 byte per word...i have no idea johnH
 
ansi.GetString("B0AD")?is this correct?
"B0AD" is a string and not a byte array. Have a closer look at what is done in the other thread, you need to get a full understanding of what is happening there or else you're helpless. How many bytes that makes each char is the encodings responsibility.
 
"B0AD" is a string and not a byte array?so?how to declare it?

Dim ansi As System.Text.Encoding = System.Text.Encoding.GetEncoding(950)
Dim bytes() As Byte = ansi.GetBytes("B0AD")
Array.ConvertAll the convert part i really don understand about that....=.=

Dim hex() As String = Array.ConvertAll(bytes, Function(b) b.ToString("x2"))

just change the x2 become?
where having the ToString Format list?
 
Last edited:
Dim ansi As System.Text.Encoding = System.Text.Encoding.GetEncoding(950)
Dim hex() As String
Dim bytes() As Byte
hex = "B0 AD".Split(" "c)
bytes = Array.ConvertAll(hex, Function(h) Byte.Parse(h, Globalization.NumberStyles.HexNumber))
MessageBox.Show(bytes(1)

i have no idea on the convert part...>>>>>>>Array.ConvertAll<<<<<<<
 
Dim Hex() As String
Dim bytes() As Byte
Hex = "B0 AD".Split(" "c)
bytes = Array.ConvertAll(Hex, Function(h) Byte.Parse(h, Globalization.NumberStyles.HexNumber))
MessageBox.Show(ChrW(bytes(0)))

only translate B0 become BIG5 , but it is meaningless....:confused::confused::confused:
 
Last edited:
done !! OMG !! i can't believe it !!! THX DUDE...DUDE JohnH have read my private message?reply me pls thx !!! i love u !!

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim ansi As System.Text.Encoding = System.Text.Encoding.GetEncoding(950)
Dim bytes() As Byte = ansi.GetBytes("鬼")
Dim hex() As String = Array.ConvertAll(bytes, Function(b) b.ToString("x2"))
MessageBox.Show(String.Join(" ", hex))
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Dim ansi As System.Text.Encoding = System.Text.Encoding.GetEncoding(950)
Dim Hex() As String
Dim bytes() As Byte
Hex = "B0 AD".Split(" "c)
bytes = Array.ConvertAll(Hex, Function(h) Byte.Parse(h, Globalization.NumberStyles.HexNumber))
Dim s As String = ansi.GetString(bytes)
MessageBox.Show(s)
End Sub
 
Back
Top