Until the next release, when "utf8" is updated to be a synonym for "utf8mb4", yes, use "utf8mb4" directly. At the next release, you can use "utf8" again.
In MySQL, never use “utf8”. Use “utf8mb4”
11–15 of 15 posts
Re: In MySQL, never use “utf8”. Use “utf8mb4”
#12Earlier quoted context omitted.
You are correct they addressed many things in recent releases. But for someone who was on MySQL 5.4-5.6 and "learned SQL" on that system - you become comfortable with things that just don't fly in SQL standard: - Aggregate operations allowed without group by - Group bys allowed regardless of selected columns / order by - Case insensitive by default ... those are just a few we've had to deal with. It's on us of course…
> crap SQL that MySQL taught you This seems like an unfair characterization. You're blaming MySQL for "teaching you" nonstandard practices just because it allowed you to use them, but where did you actually learn these practices originally? Although strict mode only became the default 4 years ago, it's been available as an option for over 15 years, and is mentioned in numerous places in the MySQL manual -- including…
Re: In MySQL, never use “utf8”. Use “utf8mb4”
#13Earlier quoted context omitted.
You are correct they addressed many things in recent releases. But for someone who was on MySQL 5.4-5.6 and "learned SQL" on that system - you become comfortable with things that just don't fly in SQL standard: - Aggregate operations allowed without group by - Group bys allowed regardless of selected columns / order by - Case insensitive by default ... those are just a few we've had to deal with. It's on us of course…
> crap SQL that MySQL taught you This seems like an unfair characterization. You're blaming MySQL for "teaching you" nonstandard practices just because it allowed you to use them, but where did you actually learn these practices originally? Although strict mode only became the default 4 years ago, it's been available as an option for over 15 years, and is mentioned in numerous places in the MySQL manual -- including…
I learned SQL within MySQL 5.4-5.6, strict mode was never enabled by default (on any install of mysql i've ever done for 5.4-5.6), so hopefully one can see how that sets someone up who is learning on the fly for long term failure (you are literally free of many constraints that exist in every other db engine).
I didn't learn how to write strict SQL from the ISO guide, I learned based on what mysql would "let me do" in order to produce the desired result. So indeed that is where I went wrong.
Re: In MySQL, never use “utf8”. Use “utf8mb4”
#14Re: In MySQL, never use “utf8”. Use “utf8mb4”
#15MySQL is a great example how extreme commitment to backwards compatibility makes your whole product backwards. It is chock full of bugs and footguns that you can work around and mitigate if you know how to configure it correctly, but most of those improvements are still not the default. And the `utf8` encoding, that does not fully support UTF-8 looks like it’ll stay around forever. ಠ_ಠ As the author of the post says,…
I agree with you on PostgreSQL. I think the whole reason most don't use it is because their provider doesn't support/install it by default or the "legacy" system was designed with MySQL because it was already installed.