0

With the arrival of the display of emoticons in Google searches, I wanted to make my own tests by embellishing a few meta_title to see if it could have a positive effect for our site.

Unfortunately, after saving my meta_title change with the special character, no get no error message but the field is now empty on both prestashop and the database.

And for good reason, the encoding in the database in utf8 instead of utf8mb4.

So I modified the encoding of the column as well as the table for which I wanted to have access to the special characters but they are transformed after "???".

It seems that I would have to change the encoding of the database itself and that's my question:

Do you know if there is any contraindication to switch the prestashop database from utf8 to utf8mb4?

I'm afraid there may be a loss of data somewhere in the database.

I am interested in all the information on the subject.

Thank you in advance.

2 Answers2

1

I've been through a migration, it did not alter any kind of field or any kind of character (it was a Wordpress, with emojies), it's just a charset extension I guess.

Matt Loye
  • 1,301
  • 2
  • 11
  • 14
0

If you are using MySQL 5.5 or 5.6 and have VARCHAR(255) (or anything >191), see http://mysql.rjweb.org/doc.php/limits#767_limit_in_innodb_indexes

You have ??? -- see this for the multiple things that need changing: Trouble with UTF-8 characters; what I see is not what I stored (Search for "question mark".)

If you are getting question marks out of the database, then the data is lost -- it was lost when trying to insert, for example, a 4-byte Emoji into the 3-byte CHARACTER SET utf8.

Rick James
  • 135,179
  • 13
  • 127
  • 222