How to convert your latin1 mysql table to utf8

Convert the existing columns content if there are unicode characters saved in non utf8 column: Have MYSQL loop through . all of your tables and columns finding all the necessary columns which have types needing to be converted: You will get queries like these which can be ran: Then we update the each tables overarching … Continued

JSON encoding Windows-1252 Unicode chars

While trying to use the json_encode function a Windows-1252 left and right quote character was breaking the encoding and I was ending up with no JSON. The string being encoded was from html within a PHP file. I’m guessing it was copy pasted from a Word doc. To fix this the mb_convert_encoding function, not the utf8_encode function, was needed. From … Continued