Hi everyone, Let's see if I can explain my problem.
I have an array of unsigned values (they came as int's with some negative values). The only way I can receive the array is as an object from an external lib. (tried other possibilities, but always get cast errors)
I can convert array elements to signed, no problem there.
Now I want to convert that array of int's to characters (I guess they are utf-8 encoded), and I'm completely lost in this conversion.
Currently I have
This works, But accented chars come wrong.
Some Hint would be very helpfull, as to be honest I'm not getting it.
(actually I think the thread title should be different (sorry)
Thanks
José
I have an array of unsigned values (they came as int's with some negative values). The only way I can receive the array is as an object from an external lib. (tried other possibilities, but always get cast errors)
I can convert array elements to signed, no problem there.
Now I want to convert that array of int's to characters (I guess they are utf-8 encoded), and I'm completely lost in this conversion.
Currently I have
B4X:
Private Dados As Object
Dados=CardReader.TransmitADPU (slotNum,SendBuffer,RecvBuffer)
Private DadosUnsigned() As Int
DadosUnsigned=CardReader.ConvertToUnsignedHex(Dados)
Private PTEID (DadosUnsigned.Length) As string
For f=0 To PTEID.Length -1
PTEID(f)=Chr(DadosUnsigned(f))
Next
This works, But accented chars come wrong.
Some Hint would be very helpfull, as to be honest I'm not getting it.
(actually I think the thread title should be different (sorry)
Thanks
José
Last edited: