Logo Questions Linux Laravel Mysql Ubuntu Git Menu

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)

like image 452
Yannick Bloem Avatar asked Mar 25 '23 13:03

Yannick Bloem

1 Answers

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?

like image 91
tadman Avatar answered Mar 27 '23 03:03