title: Converting charset of BLOB field to UTF-8 in MySQL
body: <p>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'.</p>
  
  <p>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.</p>
  
  <p>How can I convert the blob data without the need of PHP intervention?</p>
  
  <h2>Update</h2>
  
  <p>I tried copying the BLOB over to a TEXT field, but the error still exists.</p>
  
  <p>To assist, here is example data from the BLOB:</p>
  
  <p>HEX:</p>
  
  <blockquote>
    <p>613A313A7B733A373A22636F6E74656E74223B733A3333333A223C70207374796C653D22746578742D616C69676E3A2063656E7465723B223E0A093C7370616E207374796C653D22636F6C6F723A20726762283235352C203235352C20323535293B223E3C7370616E207374796C653D22666F6E742D73697A653A20323470783B223E4672696C616E736F707064726167202D2042696C646561726B69763C2F7370616E3E3C2F7370616E3E3C2F703E0A3C70207374796C653D22746578742D616C69676E3A2063656E7465723B223E0A093C62723E0A093C7370616E207374796C653D22666F6E742D73697A653A20323070783B223E3C7370616E207374796C653D22636F6C6F723A20726762283231312C203231312C20323131293B223E496E666F726D61736A6F6E202D20446F6B756D656E7461736A6F6E202D20507265737365202D20466F727374F87272656C7365723C2F7370616E3E3C2F7370616E3E3C2F703E0A223B7D</p>
  </blockquote>
  
  <p>Expected value:</p>
  
  <pre><code>a:1:{s:7:"content";s:333:"&lt;p style="text-align: center;"&gt;
      &lt;span style="color: rgb(255, 255, 255);"&gt;&lt;span style="font-size: 24px;"&gt;Frilansoppdrag - Bildearkiv&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
  &lt;p style="text-align: center;"&gt;
      &lt;br&gt;
      &lt;span style="font-size: 20px;"&gt;&lt;span style="color: rgb(211, 211, 211);"&gt;Informasjon - Dokumentasjon - Presse - Forstørrelser&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
  ";}
  </code></pre>
  
  <p>In this example, I end up with the following text displayed:</p>
  
  <blockquote>
    <p>Frilansoppdrag - Bildearkiv</p>
    
    <p>Informasjon - Dokumentasjon - Presse - Forst�rrelser</p>
  </blockquote>
  
  <p>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.</p>