I have a unicode character Ņ
whose HEX is U+0145
and integer is 325
When encoded using UTF-8
into bytes its not represented as \x145 [= 325 base10]
but represented as \xc5\x85
i.e in unicode \xc5 [197 base10] - Å and \x85 [133 base10] (i.e = 197 + 133 = 330 != 325)
Why is it so.
One advantage is that by using 2 digit hexadecimals it will use 1 byte (2 hexadecimal digits use 4 x 2 = 8 bits)