How many bytes does one Unicode character take?
Strangely enough, nobody pointed out how to calculate how many bytes is taking one Unicode char. Here is the rule for UTF-8 encoded strings: Binary Hex Comments 0xxxxxxx 0x00..0x7F Only byte of a 1-byte character encoding 10xxxxxx 0x80..0xBF Continuation byte: one of 1-3 bytes following the first 110xxxxx 0xC0..0xDF First byte of a 2-byte character … Read more