Option Explicit
Private Sub Form_Load()
Me.AutoRedraw = True
Const TEST As String = "abc123啊哦呃"
Dim bData() As Byte, i As Long
bData = TEST
Print "UNICODE"
For i = LBound(bData) To UBound(bData)
Print MyHex(bData(i)); " ";
If ((i + 1) Mod 16) = 0 Then Print
Next
bData = StrConv(TEST, vbFromUnicode)
Print
Print "............"
For i = LBound(bData) To UBound(bData)
Print MyHex(bData(i)); " ";
If ((i + 1) Mod 16) = 0 Then Print
Next
End Sub
Function MyHex(ByVal v As Byte) As String
MyHex = Right$("0" & Hex$(v), 2)
End Function
'调试下就直观多了吧。要解更多就百度吧!~