3 ms·
I think both of those things are both true. I'm guessing there are currently, only 1.1M code points defined, and these fit in 4 bytes. However, there are curren
by notJim 15y ago
I think both of those things are both true. I'm guessing there are currently, only 1.1M code points defined, and these fit in 4 bytes. However, there are currently-unallocated code points that go higher which could occupy he remaining 2 bytes that can be used with UTF-8.
- tszming 15y agoIn the past maybe it was 6, but now seems 4 is the correct one e.g. http://golang.org/pkg/utf8/ http://golang.org/pkg/utf8/ >> UTFMax = 4 // maximum number of bytes of a UTF-8 encoded Unicode character. Also 4 is max. value used in MySQL server.
- notJim 15y agoIt appears you are correct, at least based on some discussion here: http://stackoverflow.com/questions/1543613/how-does-utf-8-variable-width-encoding-work http://stackoverflow.com/questions/1543613/how-does-utf-8-va....
- dlitz 15y agoYes, the original UTF-8 spec was much more forgiving. The most recent spec, RFC 3629, restricted the range of code points and made the decoding of invalid sequences a MUST NOT requirement: http://tools.ietf.org/html/rfc3629#section-12 http://tools.ietf.org/html/rfc3629#section-12