title: Problems with bad characters in UTF8 JSON strings with Delphi XE
body: <p>We have a Delphi XE application that exchanges JSON data with a cloud application that is written in Node.</p>
  
  <p>Generally everything works fine - but every once in a while we get bad (unknown) characters in some of our strings - and we are having problems tracking it down. These characters are rendered as diamonds and have a character code of <code>65533</code></p>
  
  <p>We perform a rest POST call to get our data from the cloud and we get it as a JSON object that includes some meta-data and an array of record. We use DBXJson's TJsonObject for the json parsing in the form of </p>
  
  <pre><code>jsv := TJSONObject.parseJsonValue(s)
  </code></pre>
  
  <p>where s is the data we got from our Post call.</p>
  
  <p>From this we use a TJsonArray to get the record, traverse it and use the JSonValue.ToString to retrieve the string value.</p>
  
  <p>The data is stored in DBIsam using VarChar fields.</p>
  
  <p>Any ideas how to detect and prevent "bad" characters that appear or where else this could happen?</p>