I have searched around and for mysql it seems that utf8 is not enough, it must become utf8mb4. I just don't know how to set it up in firebird when creating the database.
What is utf8mb4? ... OK, I can find it in the net :
UTF-8 is a variable-length encoding. In the case of UTF-8, this means that storing one code point requires one to four bytes. However, MySQL's encoding called "utf8" (alias of "utf8mb3") only stores a maximum of three bytes per code point. ...
... As of MySQL 5.5.3, the utf8mb4 character set uses a maximum of four bytes per character supports supplemental characters
WTF! They already handle a variable length encoding but then leave the last byte out. Why? Totally stupid.
What is the connection between Firebird and MySQL? I thought they are separate DBs. I am not a DB expert as you can see.
Correct. MySQL and Firebird are separate DBs, but MySQL's original transaction implementation was designed by Jim Starkey* via Falcon (Storage Engine for MySQL):
https://www.firebirdnews.org/jim-starkey-introducing-falcon-storage-engine-for-mysql/https://www.firebirdnews.org/mysql-falcon-storage-engine-open-sourced-on/* Jim Starkey is known as the father of Interbase, whose fork in 2000 would become Firebird.
The Firebird documentation (see here) says that utf8 reserves four bytes.
To be precise: "Keep in mind that one UTF8 character occupies
up to 4 bytes, thus limiting the size of CHAR fields to 8,191 characters (32,767/4)."
That utf8mb4 is something specifically created by MySQL, as from the start they didn't support utf8 correctly.
Correct.