0

I have ended up with a DB possibly with wrong encoding. For example there is a row that contains

profiles – Craftsman

Is there any way to convert this back to what ever it supposed to be? I think the above character is meant to be an '. I could be wrong. I have tried converting the table to utf8mb4 by trying

ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

but no luck.

Any ideas?

Below are the mysql details

enter image description here

And running on php 5.3.29. Sorry upgrading php is not an option.

Htaccess also has a AddDefaultCharset utf-8

Ela Buwa
  • 1,652
  • 3
  • 22
  • 43
  • See Mojibake in https://stackoverflow.com/questions/38363566/trouble-with-utf8-characters-what-i-see-is-not-what-i-stored – Rick James Oct 24 '19 at 06:05

1 Answers1

0

I've just tried this way. Hope that it can help in your case.

Firstly, if you already converted the encoding to "utf8mb4", please turn it back to the previous encoding (in my case I change it to latin) Then I updated the column that has wrong encoding characters with this query

update table_name set column_name = CONVERT(CAST(column_name as BINARY) USING utf8mb4)

Then I convert the encoding to utf8mb4 one more time.

momo
  • 141
  • 6