title: How to find character at byte offset in PHP?
body: <p>I'm trying to troubleshoot an issue with some (apparently) mangled serialized data in a MySQL database, after a conversion to UTF-8. When I try to unserialize them, I get the usual:</p>
  
  <pre><code>Notice: unserialize() [function.unserialize]: Error at offset 1481 of 255200 bytes [...]
  </code></pre>
  
  <p>However, given that this is a multi-byte string, I can't figure out how to find which character is at that byte offset. What I need is something like <code>substr()</code> but for bytes, instead of characters. How can I do that?</p>
  
  <p>Thanks in advance.</p>