title: Creating data based on a JSON schema from an SQL DB. Everything works well, unless the £ sign appears anywhere in the data?
body: <p>I've got a platform that allows users to output selected data into a specific JSON schema. The code is pretty straight forward, and essentially after the SQL query I create an array, start gathering the required information and then populating.</p>
  <pre><code>$rowarray['id'] = $orgprefix.'-'.$row['ContractID'];
  $rowarray['title'] = $row['Service_Name'];
  $rowarray['description'] = $row['Description'];
  etc etc
  </code></pre>
  <p>In terms of output, I simply use</p>
  <pre><code>echo json_encode($dbdata,JSON_PRETTY_PRINT | JSON_NUMERIC_CHECK);
  </code></pre>
  <p>Anyway, all was working well, until someone mentioned that they were getting totally blank output on one of their budgets. After some serious head scratching, I realised that whenever data from the DB includes a £ sign, the entire process fails.</p>
  <p>Now obviously, I can look at options to escape data before adding it to an array, but is there a list of characters I need to be aware of when building JSON data? I was also thinking, is this some sort of encoding issue?</p>