How UTF-8 Encoding Works

This post explains exactly how UTF-8 encodes Unicode code points into bytes. If you haven&rsquo;t read the history of how we got here, see The History of Text Encoding . The Design Goals UTF-8 was designed by Ken Thompson and Rob Pike with specific goals in mind: ASCII compatibility : Bytes 0x00-0x7F mean exactly what they mean in ASCII Self-synchronization : You can identify character boundaries…