News for hackers. Stuff that matters.
Re:A Programmer’s Introduction to Unicode by pkaye on Saturday March 04, 2017 @01:08PM (#13792072)
"10" is used as a prefix for the bytes after the first. This gives it the self-synchronization property if it somehow ends up in the middle of a sequence. See the first table in this Wikipedia link: https://en.wikipedia.org/wiki/UTF-8
Re:A Programmer’s Introduction to Unicode by jcranmer on Saturday March 04, 2017 @01:12PM (#13792088)
Additionally, 110xxxxx tells you that the character is two bytes, 1110xxxx three bytes, and 11110xxx four bytes, i.e., number of bytes in number = leading 1 count.