4 ms·
Sure, in hindsight, 3 bytes is an abomination to us today. That was almost certainly not apparent to developers at the time. MySQL added its three-byte utf8 su
by evanelias 8y ago
Sure, in hindsight, 3 bytes is an abomination to us today. That was almost certainly not apparent to developers at the time.
MySQL added its three-byte utf8 support in mysql 4.1, first beta release in April 2003 [1]. Meanwhile the utf8 standard originally permitted up to 6 bytes per char, until officially changed in November 2003 [2].
Unicode support in web software -- and even programming languages -- was still rapidly evolving in 2003. The MySQL team probably just made a bad guess along the lines of "the standard allows 6 bytes but that has terrible perf and memory implications for us, and most people only use 3 bytes, so let's limit to that".
While I've lost track of how many hundreds of times I've had to tell coworkers "use utf8mb4 and not utf8 in mysql", I don't begrudge the mysql dev team for not being clairvoyant in 2003!
[1] https://lists.mysql.com/announce/161 https://lists.mysql.com/announce/161
[2] https://en.wikipedia.org/wiki/UTF-8#History https://en.wikipedia.org/wiki/UTF-8#History