If this is your first visit, check our documentation. To post, register or login.
Forums / Upgrading Your Zen Cart / Upgrading to 2.x.x / Recommended charset for DB utf8 or utf8mb4

Recommended charset for DB utf8 or utf8mb4

Started by gernot on 29 Apr 2024, 10:07 AM · Views: 704

Results 1 to 4 of 4
29 Apr 2024, 10:07 AM
#1
gernot avatar

gernot

Zen Follower

Join Date:
Feb 2017
Location:
Tokyo, Japan
Posts:
334
Plugin Contributions:
0

Post #1 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.

Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

29 Apr 2024, 10:39 AM
#2
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
635
Plugin Contributions:
0

Post #2 by g2ktcf

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.

29 Apr 2024, 10:41 AM
#3
gernot avatar

gernot

Zen Follower

Join Date:
Feb 2017
Location:
Tokyo, Japan
Posts:
334
Plugin Contributions:
0

Post #3 by gernot

Thank you! Much appreciated.

Zen Cart 1.5.6c modified for Japanese language support. Upgraded incrementally from initial 1.5.5d. Currently planning direct upgrade to 2.1.0

29 Apr 2024, 12:59 PM
#4
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,760
Plugin Contributions:
56

Post #4 by swguy

I was doing the same thing yesterday and found that utf8mb4 is the recommended in the installation documents.

Correct.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.