0

How can I get hexadecimal representation of unicode character? For example when I look unicode table for the "ā" character it shows U+0101;

Code   Glyph Decimal Html
U+0101  ā    ā  ā

But my code outputs;

[-60, -127]

I don't get How can I achieve U+0101 with this byte array. Here is my code

String s = "ā";
byte[] b = s.getBytes("UTF-8");
System.out.println(Arrays.toString(b));
hellzone
  • 5,076
  • 21
  • 77
  • 133

0 Answers0