Public Function HexToStr(ByVal strs As String) As String Dim i As Integer, tmp As String, n If Len(strs) Mod 2 Then Exit Function For i = 1 To Len(strs) Step 2 n = Val("&H" & Mid(strs, i, 2)) If n < 0 Or n > 127 Then n = Val("&H" & Mid(strs, i, 4)) i = i + 2 End If tmp = tmp & Chr(n) Next i HexToStr = tmp End Function
nan = HexToStr("C4CF")
nan = "南"
nan = "南"