I have two byte array from( in C# and Java ) a string. When I convert arrays, the results do not match. What could be the reason for this? This problem is not constant. Sometimes it produces the same results.
C#:
[0] 148
[1] 70
[2] 38
[3] 173
[4] 249
[5] 227
[6] 183
[7] 106
[8] 57
[9] 25
[10] 181
[11] 13
[12] 192
[13] 176
[14] 128
[15] 164
Java :
0 = -108
1 = 70
2 = 38
3 = -83
4 = -7
5 = -29
6 = -73
7 = 106
8 = 57
9 = 25
10 = -75
11 = 13
12 = -64
13 = -80
14 = -128
15 = -92
C# result : �F&���j9�\r����
Java Result : �F&���j9�0��
Edit :
Converter Code;
C# -
String result = UTF8Encoding.UTF8.GetString(byteArray);
Java:
String result = new String(byteArray, "UTF-8");
*Edit-2 : Its true convert.
C# :
[0] 239
[1] 195
[2] 40
[3] 19
[4] 185
[5] 36
[6] 77
[7] 132
[8] 182
[9] 122
[11] 173
[12] 12
[13] 191
[14] 100
[15] 118
Java :
0 = -17
1 = -61
2 = 40
3 = 19
4 = -71
5 = 36
6 = 77
7 = -124
8 = -74
9 = 122
10 = -70
11 = -83
12 = 12
13 = -65
14 = 100
15 = 118
C# result : ��(�$M��z���dv Java result : ��(�$M��z���dv*

