Hi!
Can you please tell me how I can convert the string "Gestión" which is in UTF-8 encoding in your right it would be "Gestión"?
I try this, but dont go ...
Thank you.
Can you please tell me how I can convert the string "Gestión" which is in UTF-8 encoding in your right it would be "Gestión"?
I try this, but dont go ...
B4X:
Dim charset As String
Dim data As String
charset = "UTF-8"
data = "as hdajksdh kasdh kashd sda" ' Here the string in UTF-8
Dim bytes As List
bytes.Initialize
Dim i As Int
Do While i < data.Length
Dim c As String
c = data.CharAt(i)
bytes.AddAll(c.GetBytes(charset))
i = i + 1
Loop
Dim b(bytes.Size) As Byte
For i = 0 To bytes.Size - 1
b(i) = bytes.Get(i)
Next
Log(BytesToString(b, 0, b.Length, charset))
BytesToString(b,0,b.Length,charset)
Thank you.