Had MySQL defined UTF-8 as up to 6 bytes initially, would they later force users to rebuilt their databases when UTF-8 was redefined to only 4 bytes?
In MySQL, don’t use “utf8”, use “utf8mb4” (2016)
131–140 of 170 posts
Re: In MySQL, don’t use “utf8”, use “utf8mb4” (2016)
#132Earlier quoted context omitted.
It was widely used before it was the default.
Certainly, but let’s not rewrite history here. What innodb could/couldn’t do was not the motivation.
Re: In MySQL, don’t use “utf8”, use “utf8mb4” (2016)
#133Earlier quoted context omitted.
> How exactly is Latin-1 privileged in this regard? Latin-1 is sufficient for languages which countries representing more than 50% of global GDP speak. It might not be fair but I’m not sure this is a question of fairness to begin with.
Oh. In that case, you do mean ASCII, methinks (which also works), with Latin-1 you're shooting yourself in both feet. (Looks for link to "falsehoods programmers believe about encodings")
Re: In MySQL, don’t use “utf8”, use “utf8mb4” (2016)
#134Possibly my favourite thing about the rise of emoji is that they’re not Basic Multilingual Plane, and so stupid hacks like MySQL’s utf8 character set (I seriously don’t know why anyone ever thought it was a good idea in 2002–2004) are now obviously insufficient for full Unicode support, and enough people care about them that adoption of this basic level of Unicode is driven, and so non-English speakers are inadverten…
Re: In MySQL, don’t use “utf8”, use “utf8mb4” (2016)
#135Possibly my favourite thing about the rise of emoji is that they’re not Basic Multilingual Plane, and so stupid hacks like MySQL’s utf8 character set (I seriously don’t know why anyone ever thought it was a good idea in 2002–2004) are now obviously insufficient for full Unicode support, and enough people care about them that adoption of this basic level of Unicode is driven, and so non-English speakers are inadverten…
> not Basic Multilingual Plane, and so stupid hacks like the utf8 character set (I seriously don’t know why anyone ever thought it was a good idea in 2004) are now obviously insufficient for full Unicode support From [0]: UTF-8 was designed with a much larger limit of 231 (2,147,483,648) code points (32,768 planes), and can encode 221 (2,097,152) code points (32 planes) even if limited to 4 bytes What is wrong with U…
Re: In MySQL, don’t use “utf8”, use “utf8mb4” (2016)
#136Earlier quoted context omitted.
You can have that now, but it doesn't work the way you think. The SVG is embedded in the font, not the string. Demo: https://eosrei.github.io/emojione-color-font/full-demo.html To create user-defined characters, you can occupy any code point in the reserved areas. https://en.wikipedia.org/wiki/Private_Use_Areas
That's nice, but I meant something else. I was thinking: what if users of Whatsapp and other chat services could define their own emoji, as they type, and share them with other users? If a friend sends you a new emoji, you could simply copy it and use it in messages of your own. This functionality doesn't work with fixed codepoints. Of course there's a million way to do this (even with today's Unicode standard), but…
There's been bugs that crash iPhones with combining Arabic, or freeze Android devices by spamming LtR override.
There's the Zalgo meme, where you drown out your words in combining diacritics.
Layout engines are already struggling to keep up with the standard, even without the ability to render a UINT_MAX x UINT_MAX canvas of infinitely repeating fractal penises.
Re: In MySQL, don’t use “utf8”, use “utf8mb4” (2016)
#137> If you need a database, don’t use MySQL or MariaDB. Use PostgreSQL. This is stupid. There are pros and cons to every database. For example, MySQL allows you to set a trigger on an op, PostgreSQL requires you to write a function first.
> This is stupid. Talk about stupid, run this query on both Mysql and Postgres: select 0 = 'banana'; Make your own conclusion.
mysql> select 0 = 'banana';
+--------------+
| 0 = 'banana' |
+--------------+
| 1 |
+--------------+
1 row in set, 1 warning (0.00 sec)
vs pg# select 0 = 'banana';
ERROR: invalid input syntax for integer: "banana"
LINE 1: select 0 = 'banana';Re: In MySQL, don’t use “utf8”, use “utf8mb4” (2016)
#138Given that the article says that everyone should use utf8mb4, then why don't/haven't they just fixed it? Should be easy enough, and probably safe, too.
Re: In MySQL, don’t use “utf8”, use “utf8mb4” (2016)
#139Earlier quoted context omitted.
Right, code units not code points. My mistake. Nonetheless that’s what you get back from e.g. java’s charAt.
You can do O(1) string operations in UTF-8 too, if you do them at the code unit level. It's just as wrong, but it's more obvious that it's wrong because it only works for ASCII instead of only working for BMP.
Re: In MySQL, don’t use “utf8”, use “utf8mb4” (2016)
#140Earlier quoted context omitted.
Right, code units not code points. My mistake. Nonetheless that’s what you get back from e.g. java’s charAt.
You can do O(1) string operations in UTF-8 too, if you do them at the code unit level. It's just as wrong, but it's more obvious that it's wrong because it only works for ASCII instead of only working for BMP.