What are the implications of turning off enforce-utf8mb4 for MySQL?
-
Are there any implications on the functionality of FusionAuth by setting the
database.mysql.enforce-utf8mb4
setting tofalse
? -
Making this change will allow FusionAuth to run even when utf8mb4 is not configured properly. We added that configuration option to ensure the limitation is understood before you turn off the enforcement.
The implication is that if you attempt to store a 4 byte unicode character the INSERT or UPDATE request will fail. The initial MySQL UTF-8 support only allowed for 3 byte characters, they then came out with utf8mb4 to support 4 byte characters. More here: https://dev.mysql.com/doc/refman/8.0/en/charset-unicode-utf8.html
For example, many emoji are 4 byte characters, so if you tried to store a piece of text with a smiley such as it will fail. The is a four byte character, U+1F601 or \xF0\x9F\x98\x81.
Unless you configure MySQL to use utf8mb4, any character points between U+10000 and U+10FFFF will fail to be stored.