Tag Archives: string

UTF encoding

Code point range UTF-8 UTF-16
hexadecimal binary Bytes
(code bits)
binary hexadecimal Bytes
(code bits)
binary hexadecimal
00 00 00
00 00 7F
0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0111 1111
1
(7)
0xxx xxxx 00
7F
2
(16)
xxxx xxxx xxxx xxxx 00 00
FF FF
00 00 80
00 07 FF
0000 0000 0000 0000 1000 0000
0000 0000 0000 0111 1111 1111
2
(11)
110x xxxx
10xx xxxx
C2 80
DF BF
00 08 00
00 FF FF
0000 0000 0000 1000 0000 0000
0000 0000 1111 1111 1111 1111
3
(16)
1110 xxxx
10xx xxxx
10xx xxxx
E0 A0 80
EF BF BF
01 00 00
10 FF FF
0000 0001 0000 0000 0000 0000
0001 0000 1111 1111 1111 1111
4
(21)
1111 0xxx
10xx xxxx
10xx xxxx
10xx xxxx
F0 90 80 80
F4 8F BF BF
4
(20)
1101 10xx xxxx xxxx
1101 11xx xxxx xxxx
D8 00 DC 00
DB FF DF FF