I need to put my Java information in a String so I use the String(byte[] arrB)
constructor.
Now this information is sent to the C program as a char*
type. Now I need to get back original bytes since, from my understanding, they were encoded in the process of creating a Java String
.
How can I do that in the C program?
So, on the C side I have these bytes:
7e 53 e9 94 d4 46 f5 7c 66 cf 85 34 18 5a ff 6 2d a3 89 48 d2 e4 46 b8 6b 43 ec 64 3a 67 f9 2 6d 12 ac e7 0 c4 99 52 68 76 76 77 12 2 de 7d 5b e7 4e 5 6 73 f4 fc 91 54 12 71 64 7a 25 3d
They are in a char*
but the reach Java as a String and the String is:
7E 53 EF BF BD EF BF BD 46 EF BF BD 7C 66 CF 85 34 18 5A EF BF BD 06 2D EF BF BD EF BF BD 48 EF BF BD EF BF BD 46 EF BF BD 6B 43 EF BF BD 64 3A 67 EF BF BD 02 6D 12 EF BF BD EF BF BD
As you can see there many similarities...