Changing text encoding in mysql

I had a mysql database in which I saved some special characters é

, but in the database it was saved in a similar way, ©, later I realized that it was encoding related and I changed the encoding scheme for my table and DB before UTF-8

, but the text already inserted into it has not changed,

My question

  • Is there a way to automatically change all content for UTF-8 "submission".
  • Is there any way i can update alteast é to é?

NOTE. I know about the update command, but I don't think it will help here with characters in the field.

+3


source to share


1 answer


I had some similar problems.

You need to set the encoding to utf-8 to:

  • html or php file
  • database column
  • and connecting to the database


From what you said, you have already set the encoding on the database column.

To change your database connection use mysqli_set_charset ($conn, 'UTF-8');

If they are all set to UTF-8, the data should display correctly.

0


source







All Articles