2 ms·
A side note: > We store some of this data in MySQL, which supports full unicode… in a version we didn’t have yet. I'm not sure about full Unicode. Anything th
by pmontra 4y ago
A side note:
> We store some of this data in MySQL, which supports full unicode… in a version we didn’t have yet.
I'm not sure about full Unicode. Anything that fits in 4 bytes is OK after a lot of false starts [1], but what about characters with a representation longer than that? According to a reply to [2]
> " " is seventeen bytes: '\xf0\x9f\xa4\xa6\xf0\x9f\x8f\xbb\xe2\x80\x8d\xe2\x99\x82\xef\xb8\x8f'
I don't have a MySQL 8 at hand to test if it fits into a utf8mb4 column.
[1] https://dev.mysql.com/doc/refman/8.0/en/charset-unicode.html https://dev.mysql.com/doc/refman/8.0/en/charset-unicode.html
[2] https://stackoverflow.com/questions/42778709/the-longest-character-in-utf-8 https://stackoverflow.com/questions/42778709/the-longest-cha...
Edit: HN doesn't like that 17-bytes character. I was able to paste it into the text area but I see it as an empty space after I submitted the comment. It's visible at stackoverflow.