0

I'm having kind of a problem with mySQL collation. My mySQL collation is utf8mb4_unicode_ci. My pages have . When I send this text "São Paulo" to mySQL it stores "São Paulo" or if I send "Conceição" it stores "Conceição". It display correctly in my page "São Paulo" and "Conceção" with or without htmlentities(). When I do a search for "São Paulo" it brings the correct records.

Why does it store those strange characters? Is there a way they can match? I've tried changing the mySQL collation to utf8_unicode_ci, utf8_general_ci, latin1_swedish_ci, latin1_bin but nothing seems to work.

Humberto
  • 19
  • 4
  • What is your db connection charset? Paste code. – btlm Jun 21 '17 at 13:24
  • 1
    [Handling Unicode Front To Back In A Web App](http://kunststube.net/frontback/) – deceze Jun 21 '17 at 13:28
  • I use this to connect, don't specify the connection charset. $this->conn = mysqli_connect(DB_SERVER, DB_USER, DB_PASS, DB_NAME); – Humberto Jun 21 '17 at 13:47
  • That's called Mojibake. See http://stackoverflow.com/questions/38363566/trouble-with-utf8-characters-what-i-see-is-not-what-i-stored – Rick James Jul 01 '17 at 16:47

0 Answers0