getBytes() in Java returns different byte array than getBytes () to c #

$0
=
$0
+
$0
No specific Bitcoin Bounty has been announced by author. Still, anyone could send Bitcoin Tips to those who provide a good answer.
0

Hi everyone.

I runs this Java code:

String s = "73b53b86-eee3-44d2-82e3-be94d93deb5b";
byte[] result = s.getBytes(Charset.forName("UTF-8"));

Length of the result var: 23

And runs this C# code:

string s = "73b53b86-eee3-44d2-82e3-be94d93deb5b";
byte[] result = Encoding.UTF8.GetBytes(s);

Length of the result var: 36

I can not understand what the problem is. Thanks

0 answers - total earned - 0 BTC ($0 USD)

0
=
0
=
$0
Everyone, even non-registered users could send Bitcoin Tips to YOU if they are inspired by your answer!

Post Answer


Will Bitcoin Tipping become a new Internet Culture?


Please share our story! THANK YOU!