I've recently converted a MySQL database over from latin1 to utf-8. All has gone well apart from a blob column. In an example, the field contains erroneous characters displayed as a 'question mark in a diamond'.
If I take this data from the blob, run it through PHP's utf8_encode() it displays fine. Furthermore, if I then save the data from utf8_encode() into the blob field, I no longer need to uf8_encode() the data to display it.
How can I convert the blob data without the need of PHP intervention?
Update
I tried copying the BLOB over to a TEXT field, but the error still exists.
To assist, here is example data from the BLOB:
HEX:
613A313A7B733A373A22636F6E74656E74223B733A3333333A223C70207374796C653D22746578742D616C69676E3A2063656E7465723B223E0A093C7370616E207374796C653D22636F6C6F723A20726762283235352C203235352C20323535293B223E3C7370616E207374796C653D22666F6E742D73697A653A20323470783B223E4672696C616E736F707064726167202D2042696C646561726B69763C2F7370616E3E3C2F7370616E3E3C2F703E0A3C70207374796C653D22746578742D616C69676E3A2063656E7465723B223E0A093C62723E0A093C7370616E207374796C653D22666F6E742D73697A653A20323070783B223E3C7370616E207374796C653D22636F6C6F723A20726762283231312C203231312C20323131293B223E496E666F726D61736A6F6E202D20446F6B756D656E7461736A6F6E202D20507265737365202D20466F727374F87272656C7365723C2F7370616E3E3C2F7370616E3E3C2F703E0A223B7D
Expected value:
a:1:{s:7:"content";s:333:"<p style="text-align: center;">
<span style="color: rgb(255, 255, 255);"><span style="font-size: 24px;">Frilansoppdrag - Bildearkiv</span></span></p>
<p style="text-align: center;">
<br>
<span style="font-size: 20px;"><span style="color: rgb(211, 211, 211);">Informasjon - Dokumentasjon - Presse - Forstørrelser</span></span></p>
";}
In this example, I end up with the following text displayed:
Frilansoppdrag - Bildearkiv
Informasjon - Dokumentasjon - Presse - Forst�rrelser
Using a few PHP functions, I'm being told the data is UTF8, the page I'm displaying in is also UTF8. So it's a bit confusion why I'm getting the errors for the special char. Furthermore, If I change the page encoding from UTF-8 to ISO-8859-15, the characters display fine.