matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.92k stars 2.66k forks source link

Document or maybe change default config for collation and charset in global.ini.php #22721

Open mikkeschiren opened 3 weeks ago

mikkeschiren commented 3 weeks ago

As default, Matomo is installed with charset utf8 (which usually means utf8mb3), but the recommended charset is utf8mb4.

For collation, the comment in default config says "Matomo should work correctly without this setting but we recommend to have a collation set" - but as of 5.1.2, this is needed to be set.

Should the default charset be changed to utf8mb4, and collation be set to utf8mb4_unicode_ci? Or maybe just update the comments in global.ini.php ?

mikkeschiren commented 3 weeks ago

I do realize that many still run Matomo on a non recommended charset - so it is challenge per se..

sgiehl commented 3 weeks ago

@mikkeschiren The default in config is utf8, as that should be supported by all supported database versions. During the installation we are trying to look up available charsets and if utf8m4 is available, this value will be set to the local config and used instead of utf8

mikkeschiren commented 3 weeks ago

Yes, but should we update the comments in the global ini file? Because it is not entirly correct now.

mikkeschiren commented 3 weeks ago

Are there really any of the supported databases that doesn't support utf8m4?

sgiehl commented 3 weeks ago

officially we still support MySQL 5.5, which might not have supported utf8mb4 in the beginning. But we might drop support for older MySQL releases in the next major version, so we might be able to update the config value then.