Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To change characters from é to é in MySQL to UTF8, follow these steps:

  1. Check the current character set of the database by running the following query:

    SHOW VARIABLES LIKE '%char%';
    
  2. If the character set is not UTF8, you need to convert it to UTF8. You can do this by running the following query:

    ALTER DATABASE database_name CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    

    Replace "database_name" with the name of your database.

  3. Change the character set of the table(s) that contain the data you want to convert to UTF8. You can do this by running the following query:

    ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    

    Replace "table_name" with the name of your table.

  4. Update the data in the table to replace the characters "é" with "é". You can do this by running the following query:

    UPDATE table_name SET column_name = REPLACE(column_name, 'é', 'é'); 
    

    Replace "tablename" with the name of your table and "columnname" with the name of the column that contains the data you want to update.

  5. Finally, check that the data has been updated correctly by running a SELECT query.