I’ve made a class to encode a string
Public Class UTF8
Public Shared Function encode(ByVal str As String)
Dim utf8Encoding As New System.Text.UTF8Encoding
Dim encodedString() As Byte
encodedString = utf8Encoding.GetBytes(str)
Return encodedString.ToString()
End Function
End Class
Return encodedString.ToString() always returns “System.Byte[]”. How could I get the real UTF-8 String?
Use UTF8.GetString(Byte[]) method.