How to convert your latin1 mysql table to utf8

Convert the existing columns content if there are unicode characters saved in non `utf8` column: UPDATE `databasename`.`prescription_template_billing_item` SET description = @txt WHERE char_length(description) = LENGTH(@txt := CONVERT(BINARY CONVERT(description USING latin1) USING utf8));

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