Recommended charset for DB utf8 or utf8mb4
Hello all,
I am doing a clean install of v2.0.0 to test, and notice that the example includes/dist-configure.php has the DB charset set to utf8.
PHP version is 8.2 and MariaDB version is 10.3.24.
Is there any guidance on whether utf8 or utf8mb4 is most apprpriate for the DB? I thought that utf8 had certain limitations and therefore utf8mb4 was preferred to handle multibyte characters going forward, but I am not clear on this.
I'd like to convert my current production 1.5.6c database from utf8 to utf8mb4 using the recommended scripts, before upgrading the production DB to v2.0.0. I expected v2.0.0 to use utf8mb4 as a default, but if utf8 is sufficient then that is no longer necessary.
Any advice appreciated.
Re: Recommended charset for DB utf8 or utf8mb4
Quote:
Originally Posted by
gernot
Hello all,
I am doing a clean install of v2.0.0 to test, and notice that the example includes/dist-configure.php has the DB charset set to utf8.
PHP version is 8.2 and MariaDB version is 10.3.24.
Is there any guidance on whether utf8 or utf8mb4 is most apprpriate for the DB? I thought that utf8 had certain limitations and therefore utf8mb4 was preferred to handle multibyte characters going forward, but I am not clear on this.
I'd like to convert my current production 1.5.6c database from utf8 to utf8mb4 using the recommended scripts, before upgrading the production DB to v2.0.0. I expected v2.0.0 to use utf8mb4 as a default, but if utf8 is sufficient then that is no longer necessary.
Any advice appreciated.
I was doing the same thing yesterday and found that utf8mb4 is the recommended in the installation documents. This allows your customers and others to use multibyte characters like emoji's and certain diacritical marks for other languages. At least that is how I understand it.
Re: Recommended charset for DB utf8 or utf8mb4
Thank you! Much appreciated.
Re: Recommended charset for DB utf8 or utf8mb4
> I was doing the same thing yesterday and found that utf8mb4 is the recommended in the installation documents.
Correct.