title: MySQL truncation command - unicode characters
body: <p>I am currently trying to adjust the values stored in a table in MySQL. The values stored contain a series of Unicode characters. I need to truncate to 40 bytes worth of storage, but when I try:</p>
  
  <pre><code>UPDATE `MYTABLE` SET `MYCOLUMN` = LEFT(`MYCOLUMN`, 40);
  </code></pre>
  
  <p>MySQL is overly helpful and retains 40 <em>characters</em>, rather than 40 <em>bytes</em>. Is there a way to get around this?</p>
  
  <p>Regards and with thanks,</p>
  
  <p>gaioshin</p>