3 ms·
In 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 numbe
by tszming 15y ago
In 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