title: how to json_encode data containing utf-8 characters
body: <p>I want to pass the result of a mysql query out as JSON in PHP 5.6.3. The data contains non alphanumeric characters, particularly in this case the 'degrees' symbol (as in <em>'45º'</em>).</p>
  
  <p><code>json_encode</code> seems to fail silently if the data contains such characters:</p>
  
  <pre><code>$json = json_encode($my_obj);
  </code></pre>
  
  <p>I <em>can</em> make the encode step work by using <code>utf8_encode</code> on the offending properties:</p>
  
  <pre><code>$my_obj-&gt;description = utf8_encode($my_obj-&gt;description);
  </code></pre>
  
  <p>...but then I get output like this: <em>'45Âº'</em> which is not desirable.</p>
  
  <p>The database table uses UTF-8 Unicode encoding (utf_unicode_ci) and the data appears to be stored and retrieved successfully. It just breaks <code>json_encode</code> when it finds these characters.</p>
  
  <p>How to solve this?</p>