Search code examples
mysqlutf-8characterdiacriticslatin

Convert characters to UTF8 in MySQL (é to é)


I've got a MySQL problem. My whole website except my database is in UTF8. I just recently tried to convert it to UTF8 with all kind of commands, but the main issue is still there:

the accents don't work. Instead of é, I've got é. Same for è, there is another type of weird character.

Is there an easy to convert all these charaters, let's say é, to é, in the base?

THanks a lot.

(by the way, the database is in latin1)


Solution

  • In this case, é is é interpreted as LATIN1 and converted to UTF-8. It might be that your database is trying to be helpful and converts to UTF-8 where no conversion is required.

    Have you tried switching the character set on your database tables?