如何将字符串转换为字节然后转换为中文字符? 我有以下代码,当然这是错误的我只是如此坚持如何做到这一点:
Public Function convertToChinese(ByVal data As String)
Dim i As Integer = 0
Dim j As Integer = 0
Dim chinese As String = Nothing
For Each C As Char In data
Dim s = System.Convert.ToString(AscW(C), 2).PadLeft(8, "0")
For Each u As Char In s.ToCharArray
j *= 2
If C = "1"c Then j += 1
i += 1
If i = 8 Then
i = 0
chinese &= Char.ConvertFromUtf32(j)
j = 0
End If
Next
Next
Return chinese
End Function