Jump to content
thirty bees forum

What's the proper "Collation" when creating a database?


Recommended Posts

Posted

1) What's the proper "Collation" when creating a database?

latin1_swedish_ci just doesn't seem right.

2) If I have databases in latin1_swedish_ci what's the best recourse to fix them?

TIA

Posted (edited)
5 hours ago, datakick said:

CHARSET=utf8mb4

COLLATE=utf8mb4_unicode_ci


ALTER TABLE <table> CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

 

Thank you DK!

Here is a snap of my live server... ? Strange

 

Edited by Script-Fu
removed my snap
Posted (edited)

Here are two snaps of live websites. One is presta v1.6.1.10 and the other is thirty bees v1.2.0

 

Edited by Script-Fu
same
Posted (edited)

Last snap to clarify I have a lot of stuff messed up!

This is from my localhost aka wamp64server phpmyadmin

 

 

 

Now I need to figure out how to make my localhost wamp64 default to the same settings I have on my live vps server. So this doesn't happen NO more. Sheesh...

No wonder nothing is going my way atm.

Never get old or for that matter trust a fart!

 

 

Edited by Script-Fu
same
Posted

<table> should be replaced by any table you wish to modify. e.g. "ps_cart"

to change on database run:

ALTER DATABASE <db name> CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

when <db name> is you db name

 

  • Thanks 1
Posted
13 minutes ago, yaniv14 said:

<table> should be replaced by any table you wish to modify. e.g. "ps_cart"

to change on database run:

ALTER DATABASE <db name> CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

when <db name> is you db name

 

If he/she doesn't know basic sql sintax and does not know what should be replaced it's better to leave it as it is. I doubt there will be any issues.

Posted
43 minutes ago, yaniv14 said:

<table> should be replaced by any table you wish to modify. e.g. "ps_cart"

to change on database run:

ALTER DATABASE <db name> CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

when <db name> is you db name

 

Thank you @yaniv14 

Posted
31 minutes ago, the.rampage.rado said:

If he/she doesn't know basic sql sintax and does not know what should be replaced it's better to leave it as it is. I doubt there will be any issues.

haha one day you will be old too just saying

Posted

Don't worry. You don't have any character set/collation problem. 

utf8mb4 is just preferred for Thirty Bees. There is no obligation. Anyone who has migrated from Prestashop has an utf8 variant. Prestashop only switched to utf8mb4 with 1.7.6 or 1.7.7.

That latin_swedish collation isn't a problem either. Some modules that have their own tables make them in the format that they prefer. And that is ok.

  • Thanks 1
Posted
15 hours ago, musicmaster said:

That latin_swedish collation isn't a problem either.

It can be a problem if you are using language with non ascii characters, such as ěščřžýáí. Search, ordering and comparison would not work as expected. 

  • 1 month later...
Posted
36 minutes ago, meshare said:

utf8mb4 is just preferred for Thirty Bees. There is no obligation. Anyone who has migrated from Prestashop has an utf8 variant.  shareit Vidmate APK

utf8 encoding is basically utf8mb3, and as such it can't store some utf8 characters. While most merchants will not encounter any issues with this, it's still recommended to update to utf8mb4 to be sure no data will be lost when saved to database.

Most importantly, without utf8mb4 encoding, you can't enter emojis into your product descriptions. And we can't allow that. /s

 

Posted
48 minutes ago, datakick said:

Most importantly, without utf8mb4 encoding, you can't enter emojis into your product descriptions. And we can't allow that. /s

I fully agree and like the change! It's quite important these days. Every field that has customer interaction might see emojis. If you like it or not, doesn't matter, customer do use it. I could also imagine that some merchant's want to use it their own. ☺️

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...