Hello,
I have a little problem, maybe who knows:
I have a tool in VB.NET that converts a string value to a base64 string.
VB.NET Code:
Dim byt As Byte() = Encoding.UTF8.GetBytes("Thomas")
Dim Base64
Base64= Convert.ToBase64String(byt)
The Base64 Value is: VGhvbWFz
Now I want to restore this Base64 string in B4A. I do not know where the mistake is or what I'm doing wrong. Maybe someone has an idea.
Here is the B4A code:
The Base64 Value is: VGhvbWFz
Sub Base64(Value as String)
Log("Value Code: " & Value)
Dim su As StringUtils
Dim bc As ByteConverter
Dim TextBytes() As Byte = bc.StringToBytes(Value,"UTF8")
Log(su.EncodeBase64(TextBytes))
End Sub
B4A Logfile:
Value Code:VGhvbWFz
VkdodmJXRno=
Got result code:VGhvbWFz
** Activity (main) Resume **
When restoring the string, the result should be "Thomas" again and not "VkdodmJXRno ="
Are there any problems between VB.NET and B4A with the UTF8 encoding?