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,393
  • 25
  • 82
  • 148

0 Answers0